[R] Strange error from R CMD INSTALL

Kjetil Brinchmann Halvorsen kjetil at acelerate.com
Thu Dec 23 14:56:49 CET 2004

Brian D Ripley wrote:

>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
>>>---------- 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
>(INSTALL, actually.) That's a plausible explanation.  From 200update.txt
>on developer.r-project.org
That looked like a plausible explication, but is not the culprit here. I 
used Gabor's divide and conquer
strategy,  and found that by eliminating some files from the data  
subdirectory the error disappears and the
build completes. all of this files involves  SPSS .sav   files read with 
read.spss from package foreign
(I have latest version installed), and thereafter some data 

However, moving the inflicted files to new test data only packages, they 
build without problems!

And, there is still left in my data subdirectory some SPSS .sav files 
which not makes problems.

Any ideas?


>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'.


Kjetil Halvorsen.

Peace is the most effective weapon of mass construction.
               --  Mahdi Elmandjra

More information about the R-help mailing list