Description Usage Arguments Value
install_deps
(recursively) finds R code files in a directory, and uses
regular expressions to find code that looks like it refers to an R package
(via extract_package_deps
). It then extracts the names of all
of these packages, checks that they're not already installed, and that they
are on CRAN, and then installs them (via install.packages
).
1 2 | install_deps(dir = getwd(), file_pattern = "\\.R$|\\.Rmd$",
cran_mirror = cran_repo(), ...)
|
dir |
The directory to search for R files to parse |
file_pattern |
A regular expression used to determine whether a file
should be parsed or not. The default will parse only |
cran_mirror |
The CRAN mirror to use. The default calls a small function which returns the Rstudio mirror, if no current default exists |
... |
Passed to |
Used for it's side effects (the installation of packages)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.