Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier R version switching on Windows #8592

Open
kalenkovich opened this issue Dec 10, 2020 · 6 comments
Open

Easier R version switching on Windows #8592

kalenkovich opened this issue Dec 10, 2020 · 6 comments

Comments

@kalenkovich
Copy link

@kalenkovich kalenkovich commented Dec 10, 2020

NB: this was a question on rstudio community.

I use a separate installation of R for each project. To make RStudio use the right one I click and hold down the Control key when I start RStudio. This opens a "Choosing R Installation" pop-up where I can select the R binary I need.

The problem is that - unlike in this RStudio support article - the pop-up shows only the very last version of R that I used. So whenever I switch projects I have to browse to the R binary that I need. This is far from convenient. And this step often becomes a block when convincing people that using RStudio is easy and fun 😄

Here are my suggestions on what could make this easier:

  • Add an option to always ask for the R version to use. Pressing ctrl is not complicated but annoying. A lot of people forget that it should be pressed after starting RStudio. Others find it hard to press it fast enough.
  • Respect RSTUDIO_WHICH_R environment variable on Windows. This has an added bonus of working on all three platforms types.
  • Remember which versions of R have been used in the past and show those in the "Choose R Version" -> "Choose a specific version of R" list.
  • Use all R versions on path (smth like which/where r ) and show those in the "Choose R Version" -> "Choose a specific version of R" list.
  • Expose the way RStudio determines the last used R version so that it can be overwritten by a script.

Some details:

  • I am on Windows 7/10.
  • RStudio version is 1.3.1093
  • None of the registry keys described in "R fow Windows FAQ" are set.
@kalenkovich
Copy link
Author

@kalenkovich kalenkovich commented Dec 10, 2020

The best thing, of course, would be if automatic selection and switching R versions worked in the same way on all platforms. If the problem is that it might lead to unexpected results, RStudio could warn the users the first time the new unified rule would result in running a different version of R.

@kevinushey kevinushey added this to the v1.5 milestone Dec 10, 2020
@MyKo101
Copy link

@MyKo101 MyKo101 commented Dec 11, 2020

I strongly believe that the R version (among other things) should be tied to the project you're working on, and thus stored in the .proj file.

This would mean that (even if you update R), you can choose whether the code in a project is updated to the current version of R or keep an older version (which may break on newer versions). A pop-up warning users when opening an "outdated" project wouldn't be too inconvenient (I don't think), and can give them the option to update their project R Version to the latest version, or just a different version if the project isn't ready for the absolute latest (e.g. update to 4.0.0 rather than 4.0.1)

Another pop-up asking whether to use the latest R when opening a New/No Project followed by asking what version to use would make it clear, and then when the New Project is saved, it gets put in the .proj file. However, I appreciate that this could be daunting to new users.

@ronblum
Copy link
Contributor

@ronblum ronblum commented Dec 14, 2020

@kalenkovich Thank you for following up on your original RStudio Community request and filing it here! We'll review it as we continue development of RStudio.

Also, thanks @MyKo101 for the added info!

@Generalized
Copy link

@Generalized Generalized commented Dec 21, 2020

I vote for this as well. I use the functionality of "portable R" under Windows, with private libraries of packages and settings. It gives me perfectly isolated environments, crucial to my work, without any other complicated or invasive solutions (virtual machines, dockers, containers, packages, etc.) and additional installation steps. Just copy entire R directory and it works as a charm. This serves the best in the industry I work in, where the final outcome must be provided without the need for any further set-up steps or forcing a privileged user. In this scenario, each project is bound to a specific R version. Sometimes I switch between version in a project to experiment with, but mainly it's linked. Choosing the x64 (or sometimes x32, to check for inconsistencies) bin from the portable R directory tree in RStudio takes time. I would love to have a simpler option for doing this.

@ronblum
Copy link
Contributor

@ronblum ronblum commented Dec 21, 2020

@Generalized Thanks for the additional info on how this would be useful, etc.! The upcoming release is 1.4. This is currently tagged for a future release, 1.5, which means we're strongly considering for then, though that's not a guarantee that it will be included. The best way to indicate support for this issue is to add a 👍 at the original request at the top. We use this to get an idea how popular requests and bugs are when we decide what to address.

@elong0527
Copy link

@elong0527 elong0527 commented Mar 31, 2021

Our organization also need this feature to develop portable R version in RStudio desktop version. This will simplify the workflow using a script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants