This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/Sys.which.html
Sys.which {base}R Documentation

Find Full Paths of Executables

Description

This is an interface to the system command which.

Usage

Sys.which(names)

Arguments

names

Character vector of names of possible executables.

Details

The system command which reports on the full names of an executable (including an executable script) found on the current path.

Value

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.

Examples

## 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"))

[Package base version 2.9.0 ]