Re: [R] defining a function using strings

2008-10-16 Thread Rolf Turner
On 17/10/2008, at 7:40 AM, Chernomoretz Ariel wrote: Hi All, I need to evaluate a series expansion using Legendre polynomials. Using the 'orthopolinom' package I can get a list of the first n Legendre polynomials as character strings. library(orthopolynom) l-legendre.polynomials(4) l [[1]]

Re: [R] defining a function using strings

2008-10-16 Thread Dimitris Rizopoulos
try this: library(orthopolynom) l - legendre.polynomials(4) fun.l - lapply(l, as.function) fun.l[[3]](1:3) I hope it helps. Best, Dimitris Chernomoretz Ariel wrote: Hi All, I need to evaluate a series expansion using Legendre polynomials. Using the 'orthopolinom' package I can get a list

Re: [R] defining a function using strings

2008-10-16 Thread Gabor Grothendieck
Try this (to evaluate them at 10): polynomial.values(l, 10) On Thu, Oct 16, 2008 at 2:40 PM, Chernomoretz Ariel [EMAIL PROTECTED] wrote: Hi All, I need to evaluate a series expansion using Legendre polynomials. Using the 'orthopolinom' package I can get a list of the first n Legendre