9 ms·
As someone who learned most of my initial coding abilities through R and RStudio in a data science context, and since moved on to more “standard” languages and
by rrjjww 2y ago
As someone who learned most of my initial coding abilities through R and RStudio in a data science context, and since moved on to more “standard” languages and IDEs, I’ve yet to find anything that comes close to the flexibility and integration of RStudio for hacking together data analytics.
VS Code/Python has made some major improvements in the past couple years but it’s still very clunky compared to the ease of running R code line by line without having to start up a debug instance. And now with copilot the most frustrating parts of R (such as remembering all the Tidyverse syntax) have been abstracted away.
- goosedragons 2y agoEmacs + ESS? Way more flexible. Maybe less integration because many of the big R package devs work for Posit. RStudio has a lot of superfluous junk in the UI I just don't need or care about.
- kqr 2y agoI've used ESS for the past few years and recently tried using RStudio when I'm on Windows. For my purposes, which is just a little industrial statistics on the side, they are remarkably similar. I feel right at home in either!
- jurimasa 2y agoIf you work with Python, Spyder comes really, really close and is way better than jupyter
- qudat 2y agoMy partner does a lot of biostats in RStudio and I really think it breds terrible habits. Instead of categorizing code by files, everything is shoved into massive files. Instead of running a file top-to-bottom, code is run out-of-order which makes the code organization and flow of a program a complete disaster. There is something to be said about running and processing large CSVs and keeping that in memory while running other parts of the program as well as having clickable access to all the dataframes loaded into memory.
- mjhay 2y agoThere's nothing about RStudio that encourages big single files or writing huge unstructured scripts. RStudio is a pretty good IDE, and R is a highly expressive functional-first [0] language. R was heavily influenced by Scheme, and has its own powerful metaprogramming [1] system - which is used to great effect in Tidyverse[2] libraries to make APIs that are nicer and convenient than anything reasonably practical in Python. The problem with a lot of end-user R code is that it is written by statisticians, not programmers. They'd write the same garbage and huge scripts in Python (trust me, I know). [0] http://adv-r.had.co.nz/Functional-programming.html http://adv-r.had.co.nz/Functional-programming.html [1] https://adv-r.hadley.nz/metaprogramming.html https://adv-r.hadley.nz/metaprogramming.html [2] https://www.tidyverse.org/ https://www.tidyverse.org/
- cameronh90 2y agoI agree that RStudio isn't too awful, but the packaging management and reproducibility situation in R is dire, even compared to Python. I have to deal with getting code from data scientists into production, and simply getting it to run outside of their mutant local environment can take days. Things are starting to get a bit better with packrat initially and now renv/pak/rig and the like, but most DS haven't heard of them, and major breakages between minor library versions are still commonplace, as are undocumeted system library dependencies. Then there is the whole stringsAsFactors nightmare, thankfully slowly on its way out but still around causing occasional catastrophic breakage. There are lots of nice things about R, but it makes it very easy to shoot yourself in the foot.
- mjhay 2y agoYeah, the package management situation is a big weak spot. There are some issues with renv, but it is usable. It definitely helps to keep a lid on the number of dependencies, and for God's sake never pull anything in from Bioconductor. IMO, new code should always prefer Tidyverse libs for basic stuff, and avoid relying on the ancient and warty standard library. All that said, I still greatly prefer it over Python for DS work.
- 2y ago
- lylejantzi3rd 2y ago> I’ve yet to find anything that comes close to the flexibility and integration of RStudio for hacking together data analytics. Is there a good demo or video you can point to that shows this? I have no experience with R, RStudio, or data science, but you've piqued my interest.
- ellisv 2y agoAny of David Robinson's (or anyone else's) Tidy Tuesday videos. https://www.youtube.com/@safe4democracy/featured https://www.youtube.com/@safe4democracy/featured
- Kalanos 2y agojupyter
- silveraxe93 2y agoThis works out of the box in VSCode? Just open a .py file, then select the snippet of code you want to run and cmd+enter It will open a new REPL for you (using your selected interpreter) the first time, and after that all commands are run in that same one.
- wodenokoto 2y agoRStudio is just way better at choosing what code to send (if you only send the line the cursor rests on you’re gonna have a bad time. VSCode is a bit better than that but not great. Also, where does your plots get drawn when you use this? RStudio just works in this regards)
- ubiquitination 2y agoI agree - I teach statistics at a University and there is really no alternative to Rstudio for working with R. This is especially true considering that the vast majority of folk using R (in my field) have no prior programming experience. Downloading R, Vscode, downloading some R plugin, getting them to talk to each other, and only then starting to learn R - isn't very straightforward. It's also remarkably consistent on different operating systems - something to consider when half the students are on windows, half on macos...
- bachmeier 2y agoRStudio Server on a Digital Ocean instance made my life a lot easier. Students fire up a browser, log in, and they're using R with all the packages. It was horrible when students ran R on their own machines back in the old days. Most of the questions I got were tech support rather than related to the material. And these days it has good Python support too.
- dcreater 2y agoJupiter (ipynb) notebooks in vs code.
- RobinL 2y agoIt looks like, as far as I can tell, VS Code doesn't support the interactive window for working in R, which was a bit of a surprise to me when i looked it up. The python interactive window has pretty much fully replaced my use of jupyter, since it gives you notebook-style output without the annoyance of the notebook format. My usual workflow is highlighting lines of code and shift-enter to execute (there's also a cells syntax). I'm surprised by this because it _is_ possible to use R in Jupyter (although I never really liked the experience, R Studio was far superior).
- yabbs 2y ago? Yes it does.
- aiisjustanif 2y agoPlease supply references for the audience.
- RobinL 2y agoI'm specifically referring to: https://code.visualstudio.com/docs/python/jupyter-support-py https://code.visualstudio.com/docs/python/jupyter-support-py The support for R looks a bit different (to me at least?): https://code.visualstudio.com/docs/languages/r https://code.visualstudio.com/docs/languages/r In the screenshot the window on the right does not look comparable to the output in a jupyter notebook. It looks more like a standard terminal. e.g. does it support interactive charts, html tables etc? The Python interactive window uses the ipykernel package to allow rich outputs like that. I still might be wrong and would like to be corrected on this, since it would mean R support in VS Code is now better than I thought (I haven't tried it fora. while)
- ZunarJ5 2y agoI use r in a Jupyter Notebook in VS via IRKernel. It's a gem.
- 2y ago
- jakupovic 2y agocat, grep, sort and awk come pretty close :)
- dcchuck 2y agoCame here to share that same experience. RStudio truly made me feel "close" to the data.
- ivansavz 2y agoAn alternative in the Python world that is definitely worth looking into is the JupyterLab Desktop app, which is a standalone installer that is cross-platform and works great for beginners (no command line needed): https://github.com/jupyterlab/jupyterlab-desktop?tab=readme-ov-file#jupyterlab-desktop https://github.com/jupyterlab/jupyterlab-desktop?tab=readme-... See my other comment in the main thread with more info.