Sys.which {base} | R Documentation |
This is an interface to the system command which
.
Sys.which(names)
names |
Character vector of names of possible executables. |
The system command which
reports on the full names of an
executable (including an executable script) found on the current path.
An ‘executable’ has extension ‘.exe’, ‘.com’,
‘.cmd’ or ‘.bat’. Such files need not actually be
executable, but this is what system
tries.
A character vector of the same length as names
, named by
names
. The elements are either the full path to the
executable/script or ""
if no executable of that name was
found.
The paths will be short paths (8+3 components, no spaces) with
\
as the path delimiter.
## 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"))