news(query, package = "R", lib.loc = NULL, format = NULL,
reader = NULL, db = NULL)## S3 method for class 'news_db':
print(x, doBrowse = interactive(),
browser = getOption("browser"), ...)
"R".NULL. The default value of NULL corresponds to all
libraries currently known.news().browseURL, accessible as via
help.start) instead of printed to the console.browseURL.print()."news_db", with
attributes "package" (and "subset" if the
query lead to proper subsetting).package is "R" (default), a news db is built with the
news since the 3.0.0 release of R (corresponding to R's top-level
File lists, grouped according to version using
strptime) format date, and
possibly further grouped according to categories using
The plain text
Additional formats and readers may be supported in the future.
Package news2Rd to convert plain text tools:::news2Rd(dir,
"NEWS.Rd"), possibly with additional argument codify = TRUE,
with dir a character string specifying the path to a package's
root directory. Upon success, the
The news db built is a character data frame inheriting from
"news_db" with variables Version, Category,
Date and Text, where the last contains the entry texts
read, and the other variables may be NA if they were missing or
could not be determined.
Using query, one can select news entries from the db. If
missing or NULL, the complete db is returned. Otherwise,
query should be an expression involving (a subset of) the
variables Version, Category, Date and
Text, and when evaluated within the db returning a logical
vector with length the number of entries in the db. The entries for
which evaluation gave TRUE are selected. When evaluating,
Version and Date are coerced to
numeric_version and Date objects,
respectively, so that the comparison operators for these classes can
be employed.
## News from a date range ('Matrix' is there in a regular R installation): if(length(iM <- find.package("Matrix", quiet=TRUE)) && nzchar(iM)) { dM <- news(package="Matrix") stopifnot(identical(dM, news(db=dM))) dM2014 <- news("2014-01-01" <= date="" &="" <="2014-12-31" ,="" db="dM)" stopifnot(paste0("1.1-",="" 2:4)="" %in%="" dm2014[,"version"])="" }="" ##="" which="" categories="" have="" been="" in="" use?sort(table(db[,="" "category"]),="" decreasing="TRUE)" entries="" with="" version="">= 3.0.0 (including "3.0.0 patched"): table(news(Version >= "3.0.0", db = db)$Version)=>