| Line 5... |
Line 5... |
| 5 |
|
5 |
|
| 6 |
\name{find.package}
|
6 |
\name{find.package}
|
| 7 |
|
7 |
|
| 8 |
\alias{find.package}
|
8 |
\alias{find.package}
|
| 9 |
\alias{path.package}
|
9 |
\alias{path.package}
|
| - |
|
10 |
\alias{packageNotFoundError}
|
| 10 |
|
11 |
|
| 11 |
\title{Find Packages}
|
12 |
\title{Find Packages}
|
| 12 |
\description{
|
13 |
\description{
|
| 13 |
Find the paths to one or more packages.
|
14 |
Find the paths to one or more packages.
|
| 14 |
}
|
15 |
}
|
| 15 |
\usage{
|
16 |
\usage{
|
| 16 |
find.package(package, lib.loc = NULL, quiet = FALSE,
|
17 |
find.package(package, lib.loc = NULL, quiet = FALSE,
|
| 17 |
verbose = getOption("verbose"))
|
18 |
verbose = getOption("verbose"))
|
| 18 |
|
19 |
|
| 19 |
path.package(package, quiet = FALSE)
|
20 |
path.package(package, quiet = FALSE)
|
| - |
|
21 |
|
| - |
|
22 |
packageNotFoundError(package, lib.loc, call = NULL)
|
| 20 |
}
|
23 |
}
|
| 21 |
\arguments{
|
24 |
\arguments{
|
| 22 |
\item{package}{character vector: the names of packages.}
|
25 |
\item{package}{character vector: the names of packages.}
|
| 23 |
\item{lib.loc}{a character vector describing the location of \R
|
26 |
\item{lib.loc}{a character vector describing the location of \R
|
| 24 |
library trees to search through, or \code{NULL}. The default value
|
27 |
library trees to search through, or \code{NULL}. The default value
|
| Line 26... |
Line 29... |
| 26 |
all libraries currently known in \code{\link{.libPaths}()}.}
|
29 |
all libraries currently known in \code{\link{.libPaths}()}.}
|
| 27 |
\item{quiet}{logical. Should this not give warnings or an error
|
30 |
\item{quiet}{logical. Should this not give warnings or an error
|
| 28 |
if the package is not found?}
|
31 |
if the package is not found?}
|
| 29 |
\item{verbose}{a logical. If \code{TRUE}, additional diagnostics are
|
32 |
\item{verbose}{a logical. If \code{TRUE}, additional diagnostics are
|
| 30 |
printed, notably when a package is found more than once.}
|
33 |
printed, notably when a package is found more than once.}
|
| - |
|
34 |
\item{call}{call expression.}
|
| 31 |
}
|
35 |
}
|
| 32 |
\details{
|
36 |
\details{
|
| 33 |
\code{find.package} returns path to the locations where the
|
37 |
\code{find.package} returns path to the locations where the
|
| 34 |
given packages are found. If \code{lib.loc} is \code{NULL}, then
|
38 |
given packages are found. If \code{lib.loc} is \code{NULL}, then
|
| 35 |
loaded namespaces are searched before the libraries. If a package is
|
39 |
loaded namespaces are searched before the libraries. If a package is
|
| Line 51... |
Line 55... |
| 51 |
|
55 |
|
| 52 |
\code{path.package} returns the paths from which the named packages
|
56 |
\code{path.package} returns the paths from which the named packages
|
| 53 |
were loaded, or if none were named, for all currently attached packages.
|
57 |
were loaded, or if none were named, for all currently attached packages.
|
| 54 |
Unless \code{quiet = TRUE} it will warn if some of the packages named
|
58 |
Unless \code{quiet = TRUE} it will warn if some of the packages named
|
| 55 |
are not attached, and given an error if none are.
|
59 |
are not attached, and given an error if none are.
|
| - |
|
60 |
|
| - |
|
61 |
\code{packageNotFoundError} creates an error condition object of class
|
| - |
|
62 |
\code{packageNotFoundError} for signaling errors. The condition object
|
| - |
|
63 |
contains the fields \code{package} and \code{lib.loc}.
|
| 56 |
}
|
64 |
}
|
| 57 |
\seealso{
|
65 |
\seealso{
|
| 58 |
\code{\link{path.expand}} and \code{\link{normalizePath}} for path
|
66 |
\code{\link{path.expand}} and \code{\link{normalizePath}} for path
|
| 59 |
standardization.
|
67 |
standardization.
|
| 60 |
}
|
68 |
}
|