| news | R Documentation |
Manipulate the NEWS.md file.
An R6 class.
new()Create a new news object.
news$new(
text = c(paste0("## version ", version), "", "---", "", "### NEWS.md setup", "",
"- added NEWS.md creation with [newsmd](https://github.com/Dschaykib/newsmd)", ""),
version = "0.0.0.9000",
file = NULL
)textvector with context for the news.md file.
versioncurrent version of the package.
filea text file with the current news.md file. Use NULL to create new file.
A new 'news' object.
print()Print a news object.
news$print()
get_text()Get the news object as a text.
news$get_text()
The context of the news file.
write()Write and save a news object.
news$write(file = "NEWS.md", reduce_dev = FALSE)
fileA path and file to where the news file is saved.
reduce_devA boolean, if TRUE dev version's points are combined into the next version
add_version()Adds a version line to a news object.
news$add_version(x)
xA string with the version number.
add_subtitle()Adds a subtitle line to a news object.
news$add_subtitle(x)
xA string with the subtitle.
add_bullet()Adds a bullet points to the last subtitle.
news$add_bullet(x)
xA vector with the bullet points.
clone()The objects of this class are cloneable with this method.
news$clone(deep = FALSE)
deepWhether to make a deep clone.
newsmd
## Create a template
my_news <- news$new()
my_news$add_subtitle("improved things 1")
my_news$add_bullet("point 1")
my_news$add_bullet("point 2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.