After installing certain packages in R I got this message:
Warning message: renv took longer than expected (20 seconds) to activate the sandbox.
The sandbox can be disabled by setting:
RENV_CONFIG_SANDBOX_ENABLED = FALSE
within an appropriate start-up .Renviron file.
See ?renv::config
for more details.
How to solve this?
R.version _
platform x86_64-apple-darwin17.0
arch x86_64
os darwin17.0
system x86_64, darwin17.0
status
major 4
minor 2.0
year 2022
month 04
day 22
svn rev 82229
language R
version.string R version 4.2.0 (2022-04-22) nickname Vigorous Calisthenics
run with RStudio Version 2023.06.1+524 (2023.06.1+524) and [renv 1.0.0]
I tried using usethis::edit_r_environ(scope = c("user"))
(https://usethis.r-lib.org/reference/edit.html) then writing Sys.setenv(RENV_CONFIG_SANDBOX_ENABLED = FALSE)
(https://rstudio.github.io/renv/reference/config.html) on the .Renviron file but didn't worked out.
So how to fix this is by using
usethis::edit_r_environ(scope = c("user"))
to open and edit the .Renviron file then running and saving this lineRENV_CONFIG_SANDBOX_ENABLED=FALSE
(without leading or trailing blank space around "="). Restart session and ready