Learn R Programming

polished (version 0.7.0)

get_dependent_packages: get packages required to run R code

Description

Note: this function is copied from the automagic R package. We are including it in polished while we await the merging of this PR https://github.com/cole-brokamp/automagic/pull/17 and a new CRAN release of automagic.

Usage

get_dependent_packages(directory = getwd())

Value

a vector of package names

Arguments

directory

folder to search for R and Rmd files

Details

parses all R and Rmd files in a directory and uses automagic::parse_packages to find all R packages required for the code to run