read.dcf(file, fields=character(0), convertSplusLines=TRUE)
write.dcf(x, file="", append=FALSE,
indent=0.1 * getOption("width"),
width=0.9 * getOption("width"))
write.dcf,
the default "" specifies output to the console.
x is a data frame;
however, if it is not, then S-PLUS attempts to coerce
x
to a data frame.
FALSE, indicating that
the contents of the existing file are deleted and the output overwrites
the file. If
TRUE, the output is appended to the file.
The DCF format stores the contents of databases as plain text files for easy reading. S-PLUS uses DCF to store system information (for example, descriptions, contents of packages, and so on).
S-PLUS implements the following rules for DCF:
   
A database consists of one or more records, each with one or
more named fields. Not every record must contain each field. A
field can appear only once in a record.
   
Regular lines cannot begin with white space.
   
Regular lines are of form
tag:value. That is, they
have a name tag and a value for the field, separated
by a colon (
:). (Only the first
: counts.)
The value can be empty. (That is whitespace only.)
   
Lines starting with whitespace are continuation lines (of the
preceding field) if at least one character in the line is non-whitespace.
   
Records are separated by one or more empty (=whitespace only)
lines.
read.dcf
returns a character matrix with one line
per record and one column per field. It ignores leading and trailing white spaces in field
values. If a tag name is specified, but the corresponding value is empty, an empty string of
length
0 is returned. If the tag name of a field is not
used in a record, then
NA is returned. If the database
contains multiple records with the same tag name, the last one found is returned.
## Create a reduced version of the main library section DESCRIPTION:
x <- read.dcf(file=system.file("DESCRIPTION", package="main"),
fields=c("Package", "Version", "Maintainer"))
write.dcf(x)