[R] Formula

Vito Ricci vito_ricci at yahoo.com
Thu Jul 15 17:58:01 CEST 2004


The '*' operator denotes factor crossing: 'a*b'
interpreted as 'a+b+a:b'
read ? formula.
Best
Vito

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


 The '*' operator denotes factor crossing:
     'a*b' interpreted as 'a+b+a:b'

=====
Diventare costruttori di soluzioni

Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml




More information about the R-help mailing list