Find external program in PATH

DESCRIPTION:

Find the complete file name of an external program you would like to execute

USAGE:

Sys.which(names, PATH=Sys.getenv("PATH"), PATHEXT)

REQUIRED ARGUMENTS:

names
A character vector of program names

OPTIONAL ARGUMENTS:

PATH
A character scalar giving a colon (Unix) or semicolon (Windows) separated list of directories in which to look for the program. The default value is Sys.getenv("PATH").
PATHEXT
On Windows, a semicolon-separated list of file name extensions which are appended to executable files. By default this is the value of Sys.getenv("PATH"), or, if that is not set to anything ".EXE;.BAT".

VALUE:

A character vector with names. Each element gives the full path to the executable given by its name.

SEE ALSO:

,

EXAMPLES:

Sys.which(c("cat", "notepad"))