Message-ID: <289647.44215.qm@web120116.mail.ne1.yahoo.com>
Date: 2011-01-12T09:29:30Z
From: Alaios
Subject: From polynomial to function
In-Reply-To: <869905.77615.qm@web120105.mail.ne1.yahoo.com>
Dear all.
I would like to use legendre polynomials which is something pretty easy in R.
x<-legendre.polynomials(2)[[3]]
> x
-0.5 + 1.5*x^2
> str(x)
Class 'polynomial' num [1:3] -0.5 0 1.5
As you can see from the code above str(x) returns that x is of class polynomial. I want to use that polynomial as a function. The reason for that is that I would be grateful if I can feed that kind of function inside integrate(f,lower=,upper=)
Could you please inform if it is possible to do that in R?
I would like to thank you in advance for your help
Best Regards
Alex