Recent version of R with RStudio environment

Hello,

Using the default R environment with RStudio, I get a rather old R version - 4.3.1 (2023-06-16). What’s the easiest way to get an up-to-date R version (i.e. 4.5)?

Ideally, I would like to use use the following docker containers

bioconductor/bioconductor_docker:devel
bioconductor/bioconductor_docker:REALEASE_3_22

Hi @lgatto ! Thank you for reaching out! The team is actively working to share a solution on this topic with you soon.

@lgatto I’ve set up two new global environments: “RStudio - Rocker” and “Bioconductor”. Both of these use the latest images (e.g. rocker/rstudio and bioconductor/bioconductor:devel). To use them, simply set up a new launcher using the global environment option.

The configuration of these launchers is a bit complicated so if you need to use a different image version, I suggest you first create a launcher using the global environment and then convert it to an “external image” environment by clicking on the “edit” button in the launcher’s side panel:

You can then change the image tag, but keep the rest of the configuration the same.

Please let me know if you manage to try this out and if you encounter any issues!

Separately, we are also working on supporting image creation that will allow you to specify a list of R packages that the environment requires and create a custom image with those packages. We hope to have that available soon.

I hope that helps!

1 Like

Thank you very much @rrrrrok ! It works like expected.

It would be great to be able to choose different releases (devel, RELEASE_3_22, …) and, as you mention, creating/customising my own images with specific packages. Let me know if I can help/test.

Hi @lgatto ! With the global session launchers that @rrrrrok has created, you should be able to create your own customized environments taking them as a base. The team is precisely devoting time to support R and R-studio code based environments, as you can check in our roadmap. In the meantime, I would suggest that you follow the steps I have tested for being able to install any additional packages you need (remember that for a given project you can set multiple session launchers, in case you need them):

  1. Create a GitHub repository with the Dockerfile that contains the reference to the base image (e.g. bioconductor/bioconductor:devel ) and then adding there any additional package. You can see the example with bioconductor here.

  2. In Renku, you add the bioconductor or rstudio rocker global session launcher in your project, and give it the name you prefer:

  3. After adding this launcher, you click Launch/Edit environment, and on the top tabs, you select External environment.

  4. In the Container Image field, you copy the image:tag to your Docker image. (For my example in GitHub, you see in the code repository at the right hand side the Packages. You click there and you will see the image:tag for that code repository)

  1. You can find the project I have created with the example here.

:information_source: Note that all the other settings in the External environment tab for setting the session launcher need to be kept (Working directory, Command ENTRYPOINT, Command arguments CMD…) as established by the global launcher.