[R] Strange error from R CMD INSTALL

Brian D Ripley ripley at stats.ox.ac.uk
Wed Dec 8 22:09:22 CET 2004


On Thu, 9 Dec 2004, Ray Brownrigg wrote:

> > Date: Wed, 08 Dec 2004 09:33:22 -0400
> > From: Kjetil Brinchmann Halvorsen <kjetil at acelerate.com>
> >
> > I am trying to install a local package and get this unexpected
> > error:
> >
> > ---------- Making package UMSA ------------
> >   adding build stamp to DESCRIPTION
> >   installing R files
> >   installing data files
> >   installing man source files
> >   installing indices
> > Error: couldn't find function "na.omit"
> > Execution halted
> >
> > na.omit of course is in package stats, and that is listed in the
> > Depends field in the DESCRIPTION file.
> >
> Check what is in your data directory.  Does something in there use
> (implicitly) na.omit?
>
> I have seen something like this (since 2.0.0) where a .R file in the
> data/ directory used a function within the package, but that function
> was not 'available' at the "installing indices" phase of the
> check/build.

(INSTALL, actually.) That's a plausible explanation.  From 200update.txt
on developer.r-project.org

2) data/*.R files must be self-sufficient, and in particular not
   depend on the package or standard packages other than base.  (This
   has always been documented, but is now enforced.)

and see also `Writing R Extensions'.

-- 
Brian D. Ripley,                  ripley at 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




More information about the R-help mailing list