From ripley at stats.ox.ac.uk  Thu Jun 10 18:53:01 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu Jun 10 18:53:05 2004
Subject: [Rd] Package installation
In-Reply-To: <3A822319EB35174CA3714066D590DCD504AF7E88@usrymx25.merck.com>
Message-ID: <Pine.LNX.4.44.0406101751070.15525-100000@gannet.stats>

On Thu, 10 Jun 2004, Liaw, Andy wrote:

> > From: Toralf Kirsten
> > 
> > Hi Uwe,
> > thanks for your fast response.
> > 
> > The content of the file izbi/R/First.lib.R of the source 
> > package is as 
> > follows:
> > *************
> > .First.lib <- function(libname, pkgname) {
> >    library.dynam("izbi", package = pkgname, lib.loc = libname)
> >    data(COLS, package=izbi)
> >    data(ROWS, package=izbi)
> > }
> > *************
> > 
> > The check command also fails (see below).
> > Any hints?
> 
> Starting in R-1.9.0, I believe, you need to quote the package name in
> data().

Yes if it a string and not a variable, and since the package might get
renamed, I think you really want

.First.lib <- function(libname, pkgname) {
   library.dynam("izbi", package = pkgname, lib.loc = libname)
   data(COLS, package=pkgname)
   data(ROWS, package=pkgname)
}

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Package installation
Prof Brian Ripley