1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dependencies.R
\name{appDependencies}
\alias{appDependencies}
\title{Detect Application Dependencies}
\usage{
appDependencies(
project = NULL,
available.packages = NULL,
fields = opts$snapshot.fields(),
implicit.packrat.dependency = TRUE
)
}
\arguments{
\item{project}{Directory containing application. Defaults to current working
directory.}
\item{implicit.packrat.dependency}{Include \code{packrat} as an implicit
dependency of this project, if not otherwise discovered? This should be
\code{FALSE} only if you can guarantee that \code{packrat} will be available
via other means when attempting to load this project.}
}
\value{
Returns a list of the names of the packages on which R code in the
application depends.
}
\description{
Recursively detect all package dependencies for an application. This function
parses all \R files in the application directory to determine what packages
the application depends directly.
}
\details{
Only direct dependencies are detected (i.e. no recursion is done to find the
dependencies of the dependencies).
Dependencies are determined by parsing application source code and
looking for calls to \code{library}, \code{require}, \code{::}, and
\code{:::}.
}
\examples{
\dontrun{
# dependencies for the app in the current working dir
appDependencies()
# dependencies for an app in another directory
appDependencies("~/projects/shiny/app1")
}
}
\keyword{internal}
|