get_libraries {autoharp} | R Documentation |
The input filename could correspond to an R script or an Rmd file.
get_libraries(fname)
fname |
The Rmd filename or R script. |
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.
A character vector containing the packages used within the Rmd document.