Disabling R package / library installation

Hi Experts,
In my work environment, we would like to disable the R packages /libraries by the R developer.
For this, we added below options to disable the library installation check and disabling external publish.

Reference URL : https://support.rstudio.com/hc/en-us/articles/210990438-Disabling-RStudio-Features

The Renviron.site placed in c:\users<username>\Documents as we got the current working from getwd() command.
The R Session has been started and we tried to install shinyAce package and it is successfully got installed.

Please let me know, how we can disable the installation of packages & libraries?

R version is 4.0.2
R Studio version is 1.2.5033

Thanks in advance,

You Renviron.site fie is in the wrong location. Quoting from above support article:

This file is located at R_HOME/etc/Renviron.site as described here: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html

See Sys.getenv("R_HOME") for where your R installation lives.

Alternatively you can use a file .Renviron in the current working directory, but for site wide changes I strongly recommend using R_HOME/etc/Renviron.site.

1 Like