top | item 39764887

RStudio: Integrated development environment (IDE) for R

99 points| _benj | 2 years ago |github.com

81 comments

order
[+] rrjjww|2 years ago|reply
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.

[+] qudat|2 years ago|reply
My 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.

[+] goosedragons|2 years ago|reply
Emacs + 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.
[+] ubiquitination|2 years ago|reply
I 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...
[+] silveraxe93|2 years ago|reply
This 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.

[+] RobinL|2 years ago|reply
It 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).

[+] lylejantzi3rd|2 years ago|reply
> 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.

[+] jurimasa|2 years ago|reply
If you work with Python, Spyder comes really, really close and is way better than jupyter
[+] dcreater|2 years ago|reply
Jupiter (ipynb) notebooks in vs code.
[+] jakupovic|2 years ago|reply
cat, grep, sort and awk come pretty close :)
[+] dcchuck|2 years ago|reply
Came here to share that same experience. RStudio truly made me feel "close" to the data.
[+] wjholden|2 years ago|reply
The killer feature of RStudio for me is RMarkdown.

I composed almost all my homeworks in grad school using RMarkdown in RStudio. You get LaTeX whenever you need it, code (I usually use it for R or Julia), and markdown for ordinary text. The kable function renders tables nicely from data frames and ggplot2 creates beautiful plots.

Mathematica and Jupyter have a few advantages, but overall I'm very happy with RStudio.

[+] fumeux_fume|2 years ago|reply
It’s really nice to have everything you need in one spot. Plus it’ll run on any OS and is free. I started learning how to program with C++ back in the early 2000s which required Windows and a Visual Studio license and it was still a pain to get stuff done. Whether it’s RStudio or Jupyter there’s really never been a better time to start picking up a language and building something useful. Three cheers for the creators, maintainers and community who support tools like this.
[+] tetris11|2 years ago|reply
Freemium is what they ("Posit") are pivoting to now.

https://posit.co/pricing/individual-products/

If you want a Rstudio server to host for a research group containing more than 5 people, talk to their sales Rep.

Otherwise each person will need to host their own Rstudio server side-by-side on the same machine.

Jupyter and JupyterHub is the way forward.

Especially if they get multi-kernel notebooks mainlined (read: what Org-Mode has been doing for decades)

[+] ivansavz|2 years ago|reply
The closest Python equivalent to RStudio is the JupyterLab Desktop app[1,2], which I highly recommend. I've entirely switched to using it for teaching, and it is a godsend, since it works the same way across platforms (win/mac/linux), installs its own Python interpreter independent of any system Python the student might have, and even comes with NumPy/SciPy/Pandas/Seaborn/statsmodels already installed, which makes it possible for me to skip the `pip ...` or `conda ...` instructions altogether.

Between the standalone desktop app, and the convenience of running JypyterLab in the cloud thanks to https://mybinder.org/ links, there is now a smooth path for beginners getting into stats/ML/data science: (1) read notebook on github or nbviewer, (2) run notebooks in the cloud via mybinder links, (3) install JupyterLab Desktop app, (4) learn to install Python+env-manager via command line. Previously, new learners were forced to jump straight to (4), but now there are logical steps along the way!

[1] https://github.com/jupyterlab/jupyterlab-desktop?tab=readme-...

[2] https://blog.jupyter.org/jupyterlab-desktop-app-now-availabl...

[+] wodenokoto|2 years ago|reply
Is it different from running through the web server? I found it to have a lot of potential but not there yet
[+] mightyham|2 years ago|reply
RStudio and the R language are a couple of my absolute favorite pieces of software. While I'm a software engineer by trade, every once in a while I need to do some data analysis work and throwing together a notebook in RStudio always makes me feel like I'm using a cheat code. For simple tasks, everything is incredibly seamless, plus coworkers who are unfamiliar with R are usually impressed by how nice ggplot visualizations can look.
[+] ellisv|2 years ago|reply
Are we just submitting GitHub repos as posts now?
[+] JR1427|2 years ago|reply
I was thinking the same. R studio is certainly not new, either.
[+] forgotpwd16|2 years ago|reply
Hasn't this been happening ever since GitHub opened?
[+] wodenokoto|2 years ago|reply
The comment section is the most interesting after all, so why not link to the source instead of digging up a blog post no one will read anyway?
[+] matttproud|2 years ago|reply
I'm about as old school as you can get with preference for CLI and simple text-oriented development environments. I recently picked up R again for a long-term data science project (https://matttproud.com/blog/posts/teaser-weather-temp-repres...) after having not used it since university. In spite of a fair bit of annoyance with the R language (https://matttproud.com/blog/posts/rant-and-r-melt-function.h...), I found RStudio to make the prototyping process with R actually tolerable. Big kudos to Posit and the R community for RStudio.

There are a couple of things I would love for the R ecosystem: project scaffolding to do bulk data generation (e.g., from continuously generated data sets). What's the best way to do this: makefiles, or what? I have a relatively short entrypoint R file that sources other leaf files to run specific analyses, but it makes the software engineer inside of me want to curl up and die.

[+] mjhay|2 years ago|reply
reshape2 (where `melt` is from) has been deprecated for some time, and for pretty good reasons. Try dplyr and tidyr instead - they are much nicer and modern. The equivalent of melt would be pivot_longer. For packaging, renv is the usual choice. I wouldn't structure the package as a bunch of scripts with an entrypoint. Just write functions as you would in other languages, and keep any specific analysis script small.

https://tidyr.tidyverse.org/

[+] lvl102|2 years ago|reply
I enjoy RStudio but the best feature of R is data.table. It’s simply unmatched.
[+] th0ma5|2 years ago|reply
Polars is faster? Data.table was a pioneering speed improvement at one point for sure.
[+] uptownfunk|2 years ago|reply
I think one of the most underrated pieces of software in modern history. Absolutely brilliant. Huge fan. I am glad to see it getting love. I’ve moved on from data science in a professional capacity but for some pet projects of mine it has been indispensable. I think managing the namespace was one non trivial concern (which may be resolved in modern versions). Otherwise very well built for data science applications. Interesting that it didn’t catch on for LLM training - I think a missed opportunity.
[+] melondonkey|2 years ago|reply
Weird one minute it feels like the internet is screaming that I’m an out-of-touch dinosaur for using R and the next a simple link to its most popular IDE makes the front of HN.
[+] gdevenyi|2 years ago|reply
If I complain here will they fix my year old bug?

https://github.com/rstudio/rstudio/issues/12508

[+] jmcphers|2 years ago|reply
Can't make any promises -- our dev team is pretty small! -- but it's been flagged for triage.
[+] gdevenyi|2 years ago|reply
The answer, it turns out, was yes!
[+] HayBale|2 years ago|reply
Ahhh I started my programming with Rstudio. Since than I changed to Emacs with ESS.

Rstudio is nice but lacks a lot of nice things from something bigger.

[+] jurimasa|1 year ago|reply
If you work with Python, Spyder comes really, really close to RStudio and is way better than jupyter
[+] rubslopes|2 years ago|reply
Is there a way to visualize a dataframe like a spreadsheet, as RStudio does, but for VSCode?
[+] Kalanos|2 years ago|reply
i use jupyter a lot for python. i occasionally have to use rstudio for bioinformatics. the ux is much, much worse. just haven't bothered to get the R kernel for jupyter working.
[+] dclaw|2 years ago|reply
Ahh cool, now r-studio brings up this instead of the 24 year old data recovery program.... :-(
[+] stonogo|2 years ago|reply
RStudio is thirteen years old so I'm not sure what changed that makes the search results different "now"