\Header{system.file}{Find Names of R System Files}
\keyword{file}{system.file}
\keyword{utilities}{system.file}
\begin{Description}\relax
Finds the full file names of files in packages etc.\end{Description}
\begin{Usage}
\begin{verbatim}
system.file(..., pkg = .packages(), lib = .lib.loc)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] character strings, specifying subdirectory and file(s)
within some package.
The default, none or \code{""}, returns the root of
package(s). Wildcards are not supported.
\item[\code{pkg}] a character vector with package names.
\item[\code{lib}] a character vector with path names of \R{} package
libraries, see \code{\Link{.lib.loc}} for the default.
\end{ldescription}
\end{Arguments}
\begin{Value}
A character vector of positive length,
containing the file names that matched \code{...}, or the empty
string, \code{""}, if none matched. If matching the root of a
package, there is no trailing separator.

As a special case, \code{system.file()} gives the root of the
\code{base} package only.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{list.files}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
system.file()            # The root of the `base' package
system.file(pkg="lqs")   # The root of package `lqs'
system.file("INDEX")
system.file("help/AnIndex", pkg = c("stepfun", "mva"))
\end{ExampleCode}
\end{Examples}

