View source: R/ChangeLog_functions.R
readChangeLog | R Documentation |
These functions ans methods can be used to manage ChangeLog files.
readChangeLog(
file,
head = "ChangeLog for package",
change = "changes in version",
item = " -"
)
writeChangeLog(
log,
file = NULL,
head = "ChangeLog for package",
change = "changes in version",
item = " -",
lineEnd = 78
)
initChangeLog(
entry = list(changed = c("initial release"), fixed = c("missing ChangeLog")),
package = "unknown",
version = "0.01-1",
date = Sys.Date()
)
file |
Character string, path to the ChangeLog file to read. |
head |
Character string, the headline text of the ChangeLog file (without the package name). |
change |
Character string, the text introducing each ChnageLog entry for a package version. |
item |
Character string, the text marking each entry item. |
log |
An object of class |
lineEnd |
Integer number, indicates where to do line breaks. |
entry |
A (named) list of character vectors. The element names will become the ChangeLog sections, each vector element an item. |
package |
Character string, the package name. |
version |
Character string, version number to look up. |
date |
The date of the ChangeLog entry in |
The ChangeLog files used for R packages are usually required to have a standard format,
if they are supposed to be parsed
by functions like tools::news2Rd
:
entries are named "Changes in version <version number>" (and optionally a YYYY-MM-DD date string afterwards). The date string is mandatory if you want to use the ChageLog functions in roxyPackage. The version number can be given in both <major>.<minor>-<revision> or <major>.<minor>.<revision> format.
they have single changes properly itemized,
by indentation and then either "o"
, "-"
or "*"
followed
by space
optionally have categories as subsections, like "Fixed", "Changed" or "Added"
readChangeLog
tries to read a given ChangeLog file and parse its content to generate a special ChangeLog object.
writeChangeLog
takes such a ChangeLog object to write it back to a file. If file=NULL
,
the log will be returned to stdout.
initChangeLog
generates a ChangeLog object from scratch, e.g.,
to get started with a new package.
An object of class ChangeLog
.
getChangeLogEntry
,
updateChangeLog
## Not run:
changelog <- readChangeLog("/home/user/myRsources/myRpackage/ChangeLog")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.