pkgHeadings | R Documentation |
We provide several utilties for working with Markdown-style NEWS.md files. Such operations include the manipulation of NEWS.md file headers and header case.
pkgHeadings(packages, vpattern = "Changes in version")
packages |
character() A vector of package names that correspond to folders in the current directory. |
vpattern |
character(1) The 'grep' input for searching the versioning line in the NEWS files. This usually starts with 'Changes in version' (default) but may differ. |
pkg |
character(1) The name of a local package whose folder is in in the current working directory. |
dry.run |
logical(1) Whether to print changes to the console (TRUE) or change the actual NEWS file in the package. |
bumpHeaders |
logical(1) Whether to increase all markdown headers by one (usually '##' to '###'; default TRUE) |
from |
character(1) The Markdown header to identify in the NEWS.md file (default '#' aka HTML tag 'h1') |
to |
character(1) The Markdown header to replace in the NEWS.md file (default '##' aka HTML tag 'h2') |
Obtain the NEWS file Markdown headings ('##') for a list of packages
with pkgHeadings
which calls headingsFormat
recursively.
It is useful to see whether there is consistency in the headings
corresponding to the 'Changes in version' line in the NEWS.md file
headerCase
uses the vpattern
input to replace any differently
formatted NEWS.md heading, e.g. CHANGES IN VERSION
to
Changes in version
where the differences are by case only.
updateHeading
Increases the Markdown HTML h1 tags to h2 tags with the
option (bumpHeaders = TRUE
) to bump all the headers for the remaining
sub-headers in order to maintain hierarchy, e.g., h2 to h3.
## Not run:
pkgHeadings(
c("MultiAssayExperiment", "curatedTCGAData", "TCGAutils",
"cBioPortalData", "SingleCellMultiModal", "RTCGAToolbox",
"RaggedExperiment")
)
headingsFormat("curatedTCGAData", "Changes in version")
headerCase("RTCGAToolbox")
updateHeading("cBioPortalData")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.