[R] Create a function "automatically" from lm formula and coefficients?

taheri htaheri.f at gmail.com
Thu Jul 5 14:15:29 CEST 2012


Hi,
I need to create a function from lm formula and coefficients to use it in my
c++ code later.
but when I do it as you said 
"require(rms) 
f <- ols( ) 
g <- Function(f) 
g(x1=2,x2=3,...) 
I realize that it didn't give me the same result as predict.lm?
how can I reach a function to give me the same results in predict?
I really need it, please answer me.

Regards,
Taheri 

--
View this message in context: http://r.789695.n4.nabble.com/Create-a-function-automatically-from-lm-formula-and-coefficients-tp4433854p4635470.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list