Rstudio or renv issue

When I create a new Rstudio project using File>New Project my cran mirror settings are often ignored silently and the default ( is used. I tried the following options, in all cases my corporate RSPM was set as the CRAN mirror in the Rstudio global settings and a new Project was created using the File > New Project in Rstudio for each scenario:

scenario result of getOption("repos")
check "use renv" option while creating project
use renv::activate from console
add line to user Rprofile explicitly setting cran = RSPM; check "use renv" option while creating project
add line to user Rprofile explicitly setting cran = RSPM; use renv::activate() from console RSPM url

I expected that in all cases my CRAN mirror from Rstudio settings (i.e., corporate RSPM) would be used.

I'm assuming it's an Rstudio issue having to do with the subprocess that's being used to setup renv in a project, but I thought I'd ask here to confirm that the issue is likely rstudio instead of renv package before filing an issue.

Thanks for the bug report! You are indeed correct that the issue here lies with the way the RStudio IDE invokes renv::init() -- in particular, it does not properly propagate the repos option to the R sub-process that calls renv::init().

Fortunately, this should be resolved in the latest daily builds of RStudio. If you have a chance, can you test and verify if the issue appears to be resolved there?

1 Like

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.