show_pkg_news: Access package news files

Description Usage Arguments Value Examples

Description

R package NEWS files are named NEWS but can have three particular formats: plain text files with no file extension; plain text markdown files with the extension .md (i.e. NEWS.md); or R documentation files with the extension .Rd. The last format is very rare. While it is reasonably simple to access the first two types of file (e.g. call to news(package = "curl")), getting access to the NEWS.md file is a bit more verbose. This function makes this more parsimonious and allows you to access the package's Github release pages where none of these are available.

Usage

1
show_pkg_news(pkg, gh_release = FALSE)

Arguments

pkg

the name of the package

gh_release

flag whether or not to source the NEWS file from the local R library or whether to try to direct you to the Github releases page if the Github URL is available in the package's DESCRIPTION file (default: FALSE).

Value

a call to utils::browseURL() to open the NEWS file or an appropriate error message if this fails

Examples

1
2
3
4
5
6
7
## Not run: 
show_pkg_news("curl")  # NEWS
show_pkg_news("Rcpp")  # NEWS.Rd
show_pkg_news("dplyr") # NEWS.md
show_pkg_news("dplyr", gh_release = TRUE)

## End(Not run)

imanuelcostigan/pkgnews documentation built on May 20, 2019, 7 p.m.