\HeaderA{loadDepends}{A function to load package/vignette dependencies}{loadDepends}
\keyword{utilities}{loadDepends}
\begin{Description}\relax
Given a package or a vignette, will determine any dependencies and
load the required packages - as well as alerting the user to any
unresolved dependencies.
\end{Description}
\begin{Usage}
\begin{verbatim}
loadDepends(x, force = FALSE, recursive = TRUE, local = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] The object to check
\item[\code{force}] If TRUE, will continue even if not all dependencies are
installed
\item[\code{recursive}] Whether or not to look at indirect dependencies
\item[\code{local}] Whether or not to only search locally or to use the
internet to find unresolved dependencies
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function will first determine if the object is an installed
package or a vignette.  In either case, it will extract a listing of
all dependencies (both the names and any versioning requirements).
If not all of the dependencies are met, the function will halt with
an error and report which packages were not met - unless the
\code{force} option is set to \code{TRUE}.  Otherwise, all of the
installed dependencies will be loaded.
\end{Details}
\begin{Value}
A character vector listing the loaded packages.  If there were no
installed dependencies to load, an empty vector is returned.
\end{Value}
\begin{Author}\relax
Jeff Gentry
\end{Author}
\begin{Examples}
\begin{ExampleCode}
## Using 'local==TRUE' in case the user doesn't have an internet
## connection available. 
   loadDepends("reposTools", local=TRUE)
\end{ExampleCode}
\end{Examples}


