[R] Formula

From: Vito Ricci <vito_ricci_at_yahoo.com>
Date: Fri 16 Jul 2004 - 01:58:01 EST


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



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 16 02:05:37 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:59 EST