Using R.2.9.0 with Posit


I know how to select between version of R.
For replication purposes I need to run R.2.9.0
However, Posit refuses to select it by using [Choose a specific version of R] on my Windows 11 system.
The error message I get is: "An error occurred while attempting to load the selected version of R. Please select a different R installation"
So, should I install an older version of Posit (R Studio) to be able to run R.2.9.0 ?
Or, am I selecting the wrong EXE (I tried R.exe)?

Any suggestion is welcome!

It has been a while since Posit (back then RStudio) dropped support for R versions prior to 3.0.

If you really wanted to install RStudio in a version compatible with R version 2.9.0 you are probably looking at the 1.0 or 1.1 version series. The source code is still available at GitHub - rstudio/rstudio: RStudio is an integrated development environment (IDE) for R - we only offer binary packages of older versions down to the 2021 version (RStudio - Previous Versions - Posit Documentation).

If your use case is to simply replicate some results from back then, I would recommend to consider running the R code outside of the RStudio IDE using command line tools. At the end of the day, RStudio IDE is just an IDE that helps you to efficiently develop code. You always can run R code outside the IDE. Running CLI may be a bit more painful but ideally you should not need to modify your code for replication.

While dealing with the CLI execution is one thing, I am wondering how much information you retained when it comes to R package versions ? Many R packages that exist on CRAN in their more recent versions do have explicit dependencies on R > 3.0.
Maybe you were only using base-R functionality in your codes but if you depend on packages, you should try to ensure that the package versions are installed in the versions as they were back then (R 2.9.2 was released in August 2009) - Unfortunately Public Posit Package Manager at the moment only has snapshots going back to 2017.
Let's assume you have a list of packages and their versions then you also still could be stuck with some of the R packages no longer compiling...

As you can see, this replication exercise could end up being a rather complex task.

Today there is many a tool available for replicating results that include tools such as renv (R opackage) for package version replicability and docker for general replication of Software environments (operating system + application software + packages)

When it comes to docker containers, you could for example use the one for r-base at Docker that at least allows you to use R 3.1.2 as the minimum version.

I would be curious on how you get on with your replication project. Happy to discuss more as needed.

Dear Michael,
Your answer is most helpful. Indeed, I am able to run my replication code with R 2.9.0 using a package that was not maintained to meet the requirements of later R releases. Although I have not explored the reasons why that might be as it depends only on the library(MASS).
Maybe that is something that would be solved by using the R 3.1.2 Docker snapshot. I will work on that first (but that will take a few days for technical reasons). Being able to use RStudio (Posit) would allow me more flexibilty with the replication effort.
So, I will write more next week.

Dear Michael,
I was able to install R 3.1.2 as well as the package that I want to use.
However, that fails to load because it was compiled 'before R 3.0.0' and thus I am limited to use R 2..9.2 and thus not able to run it using an older version of Posit/R Studio. Which is a pity as that would offer me a bit more flexibility.
Anyway, thank you again for taking care of my call for assistance.
Best regards,
Eric Melse

Quick update and this could be helpful for others that seek to reproduce rather dated computational environments.

I stumbled across CRAN - Package rang which is an R package that facilitates setting up R versions and their packages going back for 20 years ! It uses Docker containers at the moment but there is plans to add Singularity etc...

You should be able to stand up R 2.9.2 rather easily.

Dear Michael,
This is certainly something of a surprise!
I will have to go through the instructions carefully but I am excited to try this soon.
Thank you for being so attentive!
Best regards,
Eric Melse

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.