Compile NEWS files from several packages
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
if (!requireNamespace("newsfeed", quietly = TRUE))
BiocManager::install("waldronlab/newsfeed")
library(newsfeed)
- clipr - allows the user to send the collection of NEWS files to the clipboard
- rmarkdown - when
render = TRUE
incollect
, the package will show an HTML page of NEWS updates
Users should move one level up from the package directory to be able to find the NEWS files in the package:
setwd("..")
In this case, when compiling the Rmd
file, I move one level up.
collect("newsfeed", render = FALSE)
#> [1] "newsfeed"
#> [2] "----------------------------------------------------------------"
#> [3] ""
#> [4] "## Changes in version 0.1.0"
#> [5] ""
#> [6] "### New features"
#> [7] ""
#> [8] "* Restricts to only one `NEWS` file per package"
#> [9] "* `collect` function allows the extraction of the latest news for an"
#> [10] "installed package"
#> [11] "* `translate` convenience function moves plain `NEWS` files to `NEWS.md`"
#> [12] ""
#> [13] "### Bug fixes and minor improvements"
#> [14] ""
#> [15] "* Checks current packages for malformed news files. Those with the package"
#> [16] "name in the first line are not allowed (incorrect formatting)"
#> [17] ""
#> [18] ""
Here is how the NEWS collection would look if all NEWS files were
written in NEWS.md
format:
-
Restricts to only one
NEWS
file per package -
collect
function allows the extraction of the latest news for an installed package -
translate
convenience function moves plainNEWS
files toNEWS.md