parse.dcf {base} | R Documentation |
Parse Debian Control File Format
Description
Parses text read from a file in Debian control file format, e.g., the ‘DESCRIPTION’ or ‘CONTENTS’ of a package.
Usage
parse.dcf(desc = NULL, file = "", fields = NULL, versionfix = FALSE)
Arguments
text |
A character vector containing one line of the file in each element. |
file |
Name of the file to be parsed. |
fields |
A character vector of fields to return (if other fields occur in the file they are ignored. |
versionfix |
Logical, if |
Value
If fields = NULL
, a list with one element per entry is
returned. Each entry is a list of character vectors, one per field.
If fields
are specified, then a character matrix with one row
per entry and one column per field is returned.
See Also
package.contents
, library
Examples
file <- system.file("CONTENTS", pkg="mva")
parse.dcf(file=file)
## same in 2 steps
filecontent <- scan(file=file, what="", sep="\n")
parse.dcf(text=filecontent)
{utilities}