Read a Package's DESCRIPTION File

DESCRIPTION:

Reads the DESCRIPTION file for a specified package. Options allow for returning specific fields from the DESCRIPTION file.

USAGE:

packageDescription(pkg, lib.loc=NULL, fields=NULL, drop=TRUE, encoding="")

REQUIRED ARGUMENTS:

pkg
a character string specifying the package name.

OPTIONAL ARGUMENTS:

lib.loc
a character vector specifying the library location where pkg is installed. The default searches the standard library locations.
fields
a character vector specifying the tags in the DESCRIPTION file to return. The default is to return all fields.
drop
a logical value; if TRUE, and the length of fields is one, then a single character string is returned instead of an object of class "packageDescription"..
encoding
this value is currently ignored. It is included for compatibility with R.

VALUE:

an object of class "packageDescription". There is a print method to display this. The object "packageDescription" object includes a "file" attribute that indicates the file system location of the DESCRIPTION file.

If drop=TRUE and the fields is of length one, a single character string containing the fields value from the DESCRIPTION file is returned.

SEE ALSO:

EXAMPLES:

packageDescription("main")  # the main S+ package description
packageDescription("maps")  # the maps package description