Dear all, Is there *any* reason explaining what I describe below? I have the following line
myfun(x) If I type them directly in R (or copy/past), it works.. However if I type in R 2.6.1 > source("code.R") ##code.R includes the above line Error in inherits(x, "data.frame") : object "d" not found namely myfun() does not work correctly. In particular the non-working line inside myfun() is update(eval(x$call$obj), data=d) #d is created in myfun() My question is: why the problem occurs just via source()ing??? many thanks, vito ==================================== Vito M.R. Muggeo Dip.to Sc Statist e Matem `Vianelli' Università di Palermo viale delle Scienze, edificio 13 90128 Palermo - ITALY tel: 091 6626240 fax: 091 485726/485612 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.