install_deps: Recursively Parse R Files in a Directory, and Install...

Description Usage Arguments Value

Description

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).

Usage

1
2
install_deps(dir = getwd(), file_pattern = "\\.R$|\\.Rmd$",
  cran_mirror = cran_repo(), ...)

Arguments

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 .R and .Rmd files

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 install.packages

Value

Used for it's side effects (the installation of packages)


brendan-R/brocks documentation built on May 13, 2019, 5:07 a.m.