system.file(..., package=NULL, lib.loc=NULL)
NULL
(the default), the top-level SHOME
directory is assumed. This default is different from R, where
the default is the "base" package.
...
arguments, or the empty string, "",
if none were found.
If no
...
arguments are given, the returned
value is the full path to the directory of the package specified by the
package
argument.
This function returns the full path to a file or directory in a package (library, module, or chapter). Given the name of the package and the name of the file, it finds the path to the package and tacks the file name onto it. The full name is returned if the files exists.
Both attached and unattached libraries are searched, looking
in all the places library() or module() would look unless the
lib.loc
argument is given.
The package directory must contain a "DESCRIPTION"
file or a ".Data" subdirectory.
This function emulates R's
system.file
function,
but the default value of the
package
argument differs,
so that calling the function with no arguments,
system.file()
, gives a different result.
file.show(system.file("README", package="pkgutils"), pager="cat")
list.files(file.path(system.file(), "doc"))