get_libraries: Extracts the Packages Used in An Rmd File.

Description Usage Arguments Details Value

View source: R/utils.R

Description

The input filename could correspond to an R script or an Rmd file.

Usage

1

Arguments

fname

The Rmd filename or R script.

Details

The file is assumed to be either an R script or an Rmd file. If it is found to be an Rmd file using extract_chunks, it is purl-ed before libraries are extracted. If it is found to be NOT an Rmd, it is assumed to be an R script and nothing is done to process it.

The file is not parsed, so even text files will work with this function.

Value

A character vector containing the packages used within the Rmd document.


autoharp documentation built on Nov. 13, 2021, 1:06 a.m.