| package.contents {base} | R Documentation |
Parses and returns the `CONTENTS' and `DESCRIPTION' file of a package.
package.contents(pkg, lib = .lib.loc) package.description(pkg, lib = .lib.loc, fields = NULL)
pkg |
a character string with the package name. |
lib |
a character vector with path names of R package libraries. |
fields |
a character vector giving the tags of fields to return (if other fields occur in the file they are ignored). |
package.contents returns NA if there is no
`CONTENTS' file for the given package; otherwise, a character
matrix with column names c("Entry", "Keywords", "Description")
and rows giving the corresponding entries in the CONTENTS data base
for each Rd file in the package.
If a `DESCRIPTION' for the given package is found and can
successfully be read, package.description returns a named
character vector with the values of the (given) fields as elements and
the tags as names. If not, it returns a named vector of NAs
with the field tags as names if fields is not null, and
NA otherwise.
package.contents("mva")
package.contents("mva")[, c("Entry", "Description")]
package.description("ts")
package.description("ts")[c("Package", "Version")]
## NOTE: No subscripting using `$' or abbreviated field tags!