% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_libraries}
\alias{get_libraries}
\title{Extracts the Packages Used in An Rmd File.}
\usage{
get_libraries(fname)
}
\arguments{
\item{fname}{The Rmd filename or R script.}
}
\value{
A character vector containing the packages used within the Rmd
document.
}
\description{
The input filename could correspond to an R script or an Rmd file.
}
\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 \link{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.
}
