[R] as.formula(string) and augPred in lme

Dieter Menne dieter.menne at menne-biomed.de
Thu Jan 30 09:41:02 CET 2003


Using formulas constructed from strings only
partially works for me in lme:

library(nlme)
data(Orthodont)

fm2<-lme(as.formula("distance~age"),data=Orthodont,random=~1|Subject)
summary(fm2) # works
augPred(fm2) # fails
#Error in inherits(object, "formula") : 
#Argument "object" is missing, with no default

I assume that my use of as.formula is wrong, but what's the right way?
Or at least a workaround?


Dieter Menne




More information about the R-help mailing list