[R] Evaluating a formula

philippe massicotte pmassicotte at hotmail.com
Fri Jan 16 09:16:08 CET 2015


Hi all.

How we evaluate a formula in R?

Ex.:

params <- list(a = 2, b = 3)
x <- seq(1,10, length.out = 100)

func1 <- as.formula("y ~ a*x^2 + b*x")

##How to evaluate func1 using x and the params list
???


Thank you in advance,
Phil

 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list