packageDescription
Read a Package's DESCRIPTION File
Description
Reads the DESCRIPTION file, or specific fields from the DESCRIPTION file, for the specified package.
Usage
packageDescription(pkg, lib.loc = NULL, fields = NULL, drop = TRUE,
encoding = "")
packageVersion(pkg, lib.loc = NULL)
maintainer(pkg)
packageDate(pkg, lib.loc = NULL,
date.fields = c("Date", "Packaged", "Date/Publication", "Built"),
tryFormats = c("%Y-%m-%d", "%Y/%m/%d", "%D", "%m/%d/%y"),
desc = packageDescription(pkg, lib.loc = lib.loc, fields = date.fields))
Arguments
pkg |
a character string specifying the package name.
|
lib.loc |
a character vector specifying the library directories where pkg
is installed.
The default searches the library directories given by .libPaths().
|
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 (the default),
and the length of fields is one,
then a single character string is returned instead of an object
of class "packageDescription".
|
encoding |
the string encoding to use for newly-created strings.
(See Encoding.)
In TIBCO Enterprise Runtime for R, this argument is not implemented.
|
date.fields |
the names of the fields in which to look for a date. The first one
containing a string parseable by one of the tryFormats will
be used. The field will be split by semicolons and each piece will
be parsed.
|
tryFormats |
character strings to use as formats passed to as.Date.character
when converting the date fields to Date objects. The first
one to successfully parse a date field will be used.
|
desc |
a packageDescription object, typically produced by calling packageDescription
with the other arguments to packageDate.
|
Value
packageDescription | returns an object of class "packageDescription".
You can use a print method to display this returned object.
The object "packageDescription" includes
a "file" attribute that indicates the file system
location of the DESCRIPTION file.
Returns a single character string containing the fields
value from the DESCRIPTION file if drop=TRUE and the fields is of length one.
|
packageVersion | returns the version (as a package_version object). |
maintainer | returns the the maintainer (as a string containing an email address) of the package. |
.
packageDate | returns a Data derived object from the first field of the
description file containing something that is interpretable as a date. |
Differences between TIBCO Enterprise Runtime for R and Open-source R
In TIBCO Enterprise Runtime for R, the encoding argument is not implemented.
If this argument is given, a warning is generated.
See Also
Examples
packageDescription("base") # the base TIBCO Enterprise Runtime for R package description
packageDescription("arbor") # the arbor package description
maintainer("stats") # email address for questions about this package
packageVersion("stats") # the version of the package.
packageDate("stats") # the date the package was built.