system.file {base} | R Documentation |
Finds the full file names of files in packages etc.
system.file(..., package = "base", lib.loc = NULL)
... |
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
|
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.
R.home
for the root directory of the R
installation, list.files
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")