Sys.which                package:base                R Documentation

_F_i_n_d _F_u_l_l _P_a_t_h_s _o_f _E_x_e_c_u_t_a_b_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     This is an interface to the system command 'which'.

_U_s_a_g_e:

     Sys.which(names)

_A_r_g_u_m_e_n_t_s:

   names: Character vector of names of possible executables.

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

     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.

_E_x_a_m_p_l_e_s:

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

