read.dcf(file, fields = NULL, all = FALSE, keep.white = NULL)
write.dcf(x, file = "", append = FALSE, indent = 0.1 * getOption("width"), width = 0.9 * getOption("width"), keep.white = NULL)
""
indicates output to the console. For read.dcf
this
can name a compressed file (see gzfile
).all
is false (default), only the last such occurrence is
used.NULL
(default)
indicating that there are no such fields. Coerced to character if
possible. For fields where whitespace is not to be kept as is,
read.dcf
removes leading and trailing whitespace, and
write.dcf
folds using strwrap
.
x
to a data frame.TRUE
, the output is appended to the
file. If FALSE
, any existing file of the name is destroyed.The DCF rules as implemented in R are:
tag:value
, i.e., have a name
tag and a value for the field, separated by :
(only the first
:
counts). The value can be empty (i.e., whitespace only).
Note that read.dcf(all = FALSE)
reads the file byte-by-byte.
This allows a DESCRIPTION file to be read and only its ASCII
fields used, or its Encoding field used to re-encode the
remaining fields.
write.dcf
does not write NA
fields.
write.table
. available.packages
, which uses read.dcf
to read
the indices of package repositories.