I am encountering issues with the Rprofile.site configuration for our workbench pro server.
In particular, we have custom frozen versions of R in /opt/R/x.y.z
, and I would like to link to each of them a snapshot of CRAN from Rstudio Public Package Manager.
So, as I found in many resources also from RStudio, I created the /opt/R/x.y.z/lib/R/etc/Rprofile.site
and, inside, I put (only), e.g., for x.y.z = 4.1.3:
local({
options(
repos = c(
CRAN = "https://packagemanager.rstudio.com/all/2022-04-21+Y3JhbiwyOjQ1MjYyMTU7NDAxNEZFQzY"
)
)
})
Anyway, that seems to not affect it at all on the startup configuration, and I continue to get the following output from any session
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
As it is set in the RStudio global preferences.
I have tried to restart the server, to remove user- and project-level .Rprofile(s), the result is still the same.
I would need to set a default repo for users who do not set it on their own; how can I investigate/solve that?
Thank you,
Corrado.