system.file               package:base               R Documentation

Find Names of R System Files

Description:

     Finds the full file names of files in packages etc.

Usage:

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

Arguments:

     ...: 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.

     pkg: previous name for argument `package'.  Deprecated.

     lib: previous name for argument `lib.loc'.  Deprecated.

Value:

     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.

See Also:

     `list.files'

Examples:

     system.file()                # The root of the `base' package
     system.file(package = "lqs") # The root of package `lqs'
     system.file("INDEX")
     system.file("help", "AnIndex", package = "stepfun")

