You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, some R packages are necessary for some code to work but not explicitly loaded in any notebook/scripts (for instance packages listed as dependency in Suggests field).
Example:
yaml package required by RStudio to read Quarto markdown (.qmd) file
farff package required to download some datasets on OpenML.org through the OpenML R package
So even after doing renv::install("this-package"), {this-package} will not be added to the renv.lock file as long as library(this-package) is not called somewhere.
It is possible to use renv::record("this-package") to manually add it to the renv.lock file but it will be removed by the next snapshot.
Per rstudio/renv#1018 the solution is to add a file deps.R containing as much library(.) call to load this type of required package that are never loaded, e.g.
library(yaml)
library(farff)
The text was updated successfully, but these errors were encountered:
Sometimes, some R packages are necessary for some code to work but not explicitly loaded in any notebook/scripts (for instance packages listed as dependency in
Suggests
field).Example:
yaml
package required by RStudio to read Quarto markdown (.qmd
) filefarff
package required to download some datasets on OpenML.org through theOpenML
R packageSo even after doing
renv::install("this-package")
,{this-package}
will not be added to therenv.lock
file as long aslibrary(this-package)
is not called somewhere.It is possible to use
renv::record("this-package")
to manually add it to therenv.lock
file but it will be removed by the next snapshot.Per rstudio/renv#1018 the solution is to add a file
deps.R
containing as muchlibrary(.)
call to load this type of required package that are never loaded, e.g.The text was updated successfully, but these errors were encountered: