[R] Error in get(x, envir, mode, inherits)

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Aug 24 10:22:14 CEST 1999


Murray Jorgensen <maj at waikato.ac.nz> writes:

> Dear R list,
> 
> members of my course have encountered the following error message:
> 
> > slm <- lm(price ~ engsize, autoframe)
> Error in get(x, envir, mode, inherits) : variable "FUN" was not found
> [more context is given in the fuller listing below].
> 
...
> > autoframe <- read.table("z:/321 Folder/Data/auto.dat", header=T)

Windows, eh? Which version of R? 

It might be a memory corruption bug of some sort, but without the
actual dataset it will be difficult to reproduce.

Does the same thing happen with the built-in data sets (e.g.
airquality), like

data(airquality)
dim(airquality)
summary(airquality)
attach(airquality)
slm<-lm(Ozone~Temp,airquality)

which would seem to be equivalent to your example (and doesn't crash
for me). 

Is your example the *entire* set of statements leading to the error
condition or might there be strange things going on earlier on?
Accidentally redefining a function may lead also to this kind of
effect.

One useful thing would be to issue a traceback() when the error
occurs, which should tell you which function the error occurred in.
Then one might set a debug() on the function and single step.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list