system.file               package:base               R Documentation

_F_i_n_d _N_a_m_e_s _o_f _R _S_y_s_t_e_m _F_i_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Finds the full file names of files in packages etc.

_U_s_a_g_e:

     system.file(..., package = "base", lib.loc = NULL)

_A_r_g_u_m_e_n_t_s:

     ...: character strings, specifying subdirectory and file(s) within
          some package.  The default, none, returns the root of the
          package.  Wildcards are not supported.

 package: a character string with the name of a single package. An
          error occurs if more than one package name is given.

 lib.loc: a character vector with path names of R libraries, or 'NULL'.
           The default value of 'NULL' corresponds to all libraries
          currently known.  If the default is used, the loaded packages
          are searched before the libraries.

_V_a_l_u_e:

     A character vector of positive length, containing the file names
     that matched '...', or the empty string, '""', if none matched. 
     If matching the root of a package, there is no trailing separator.

     As a special case, 'system.file()' gives the root of the 'base'
     package only.

_S_e_e _A_l_s_o:

     'R.home' for the root directory of the R installation,
     'list.files'

_E_x_a_m_p_l_e_s:

     system.file()                  # The root of the 'base' package
     system.file(package = "stats") # The root of package 'stats'
     system.file("INDEX")
     system.file("help", "AnIndex", package = "splines")

