| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/path_package.R |
| 3 |
\name{path_package} |
| 4 |
\alias{path_package} |
| 5 |
\title{Construct a path to a location within an installed or development package} |
| 6 |
\usage{ |
| 7 |
path_package(package, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{package}{Name of the package to in which to search} |
| 11 |
|
| 12 |
\item{...}{Additional paths appended to the package path by \code{\link[=path]{path()}}.} |
| 13 |
} |
| 14 |
\description{ |
| 15 |
\code{path_package} differs from \code{\link[=system.file]{system.file()}} in that it always returns an |
| 16 |
error if the package does not exist. It also returns a different error if |
| 17 |
the file within the package does not exist. |
| 18 |
} |
| 19 |
\details{ |
| 20 |
\code{path_package()} also automatically works with packages loaded with devtools |
| 21 |
even if the \code{path_package()} call comes from a different package. |
| 22 |
} |
| 23 |
\examples{ |
| 24 |
path_package("base") |
| 25 |
path_package("stats") |
| 26 |
path_package("base", "INDEX") |
| 27 |
path_package("splines", "help", "AnIndex") |
| 28 |
} |