[R] formula

solares@unsl.edu.ar solares at unsl.edu.ar
Thu Jul 15 17:28:30 CEST 2004


Hi, i 'dont understand how to take a general formula, view this:

x<-1:5
y<-c(0,1,1.7,2,2.1.4)
 dummy<-data.frame(x=x,y=y)
formula<-"y~A*log(x)/log(2)"
formu<-as.formula(formula)
fm<-lm(formu,data=dummy)
Error in eval(expr, envir, enclos) : Object "A" not found

but A is the parameter of fitting, why is this?Thanks Ruben




More information about the R-help mailing list