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

As a special case, \texttt{system.file()} gives the root of the
\texttt{base} package only.\end{Value}
\begin{SeeAlso}
\texttt{\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}

