From Friedrich.Leisch at ci.tuwien.ac.at  Thu Jun 24 22:14:53 2004
From: Friedrich.Leisch at ci.tuwien.ac.at (Friedrich.Leisch@ci.tuwien.ac.at)
Date: Thu Jun 24 22:30:58 2004
Subject: [Rd] news file included in source but not binary package
In-Reply-To: <3A822319EB35174CA3714066D590DCD504AF7F6B@usrymx25.merck.com>
References: <3A822319EB35174CA3714066D590DCD504AF7F6B@usrymx25.merck.com>
Message-ID: <16603.13885.913179.863810@celebrian.ci.tuwien.ac.at>

>>>>> 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?

best,
fritz


[Rd] news file included in source but not binary package
Friedrich.Leisch@ci.tuwien.ac.at