[Rd] news file included in source but not binary package

Friedrich.Leisch at ci.tuwien.ac.at Friedrich.Leisch at ci.tuwien.ac.at
Thu Jun 24 22:14:53 CEST 2004

>>>>> On Thu, 24 Jun 2004 10:37:49 -0400,
>>>>> Liaw, Andy (LA) wrote:

  > Thanks to Brian, Roger and Dirk for the pointer to inst.  I do remember it,
  > but R-exts doesn't really suggest what that directory is for, merely what
  > would happen to files placed there.  For a source package, though, that
  > seems a rather obscure place to put a `NEWS' file...

I agree ...

  > On a slightly different topic:  May I suggest inclusion of something like
  > the following (suitably modified, if need be) in the next version of R (and
  > perhaps even advertise it in the startup message)?

  > news <- function(package=NULL, lib.loc=NULL) {
  >     if (is.null(package)) {
  >         file.show(file.path(R.home(), "NEWS"),
  >                   title=paste("NEWS for R-",
  >                   paste(R.version[c("major", "minor")], collapse=".")))
  >     } else {
  >         ## check if package is installed
  >         pkgs <- installed.packages(lib.loc=lib.loc)
  >         which <- match(package, pkgs[, "Package"])
  >         if (is.na(which)) stop(package, "not found")
  >         newsfile <- file.path(pkgs[which, "LibPath"], "NEWS")
  >         if (!file.exists(newsfile)) stop("Sorry, no news from Lake
  > Wobegon...")
  >         file.show(newsfile, title=paste("NEWS for ",
  >                             paste(pkgs[which, c("Package", "Version")],
  >                                   collapse="_")))
  >     }
  > }

You might want to take a look at the system.file() function, that
reduces the above quite condiderably :-)

But to get to the heart of the email (something similar was proposed
by Greg Warnes a few weeks ago): We should definetely provide a simple
mechanism to see the latest changes in a package.

Question: I am aware of files calles NEWS and ChangeLog (or CHANGELOG,
etc.) holding the relevant information ... are there any others we
want/need to respect?


More information about the R-devel mailing list