Read, write and update the DESCRIPTION file. read.description reads the
DESCRIPTION file in the current project directory and returns a named list.
write.description writes the named list back to disk, overwriting the
current DESCRIPTION file. Finally, update_description combines both functions
by reading the DESCRIPTION file, updating or creating a field and writing the result
back to disk.
Usage
read.description()
write.description(description)
update_description(fieldname, value, after = NULL)
Arguments
description
the DESCRIPTION file.
fieldname
the name of the field.
value
the new value.
after
if the field name is new, the name of the field after which the element is placed.
Details
The 'Depends', 'Imports' and 'Suggests' fields are sorted before writing the DESCRIPTION file.
# NOT RUN {description = read.description()
write.description(read.description())
#update date in description fileupdate_description("Date", format(Sys.Date(), "%Y%-%m-%d"))
# }# NOT RUN {# }