\HeaderA{Sys.which}{Find Full Paths of Executables}{Sys.which}
\keyword{utilities}{Sys.which}
\begin{Description}\relax
This is an interface to the system command \code{which}.
\end{Description}
\begin{Usage}
\begin{verbatim}
Sys.which(names)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{names}] Character vector of names of possible executables.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The system command \code{which} reports on the full names of an
executable (including an executable script) found on the current path.
\end{Details}
\begin{Value}
A character vector of the same length as \code{names}, named by
\code{names}.  The elements are either the full path to the
executable/script or \code{""} if no executable of that name was
found.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
## the first two are likely to exist everywhere
## texi2dvi exists on most Unix-alikes and under MiKTeX
Sys.which(c("ftp", "ping", "texi2dvi", "this-does-not-exist"))
\end{ExampleCode}
\end{Examples}

