get_libraries {autoharp} | R Documentation |
Extracts the Packages Used in An Rmd File.
Description
The input filename could correspond to an R script or an Rmd file.
Usage
get_libraries(fname)
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.
[Package autoharp version 0.0.10 Index]