flâneur — a map of the web's best reading

Find R package dependencies in a project — dependencies • renv

rstudio.github.io · 1,122 words · saved by 1 readers

dependencies() will crawl files within your project, looking for R files and the packages used within those R files. This is done primarily by parsing the code and looking for calls of the form library(package), require(package), requireNamespace("package"), and package::method(). renv also supports package loading with box (box::use(...)) and pacman (pacman::p_load(...)) . For R package projects, dependencies expressed in the DESCRIPTION file will also be discovered. Note that the rmarkdown package is required in order to crawl dependencies in R Markdown files. The path to a .R, .Rmd, .qmd, DESCRIPTION, a directory containing such files, or an R function. The default uses all files found within the current working directory and its children. The root directory to be used for dependency discovery. Defaults to the active project directory. You may need to set this explicitly to ensure that your project's .renvignores (if any) are properly handled. Unused arguments, reserved for future e

Find R package dependencies in a project — dependencies • renv Skip to content Find R package dependencies in a project Source: R/dependencies.R dependencies.Rd dependencies() will scan files within your project, looking for R files and the packages used within those R files. This is done primarily by parsing the code and looking for calls of the form library(package) , require(package) , requireNamespace("package") , and package::method() . renv also supports package loading with box ( box::use(...) ) and pacman ( pacman::p_load(...) ). For R package projects, renv will also detect dependenci

Explore this link on the map →

related reading