[R] scripting/littler: How to call function named iteratively (`f1`, `f2`, …)?

2011-07-29 Thread Paul Menzel
Dear R folks, wanting to compare different implementations of a solution I want to script it to iterate over the different implementations. Is there a way to do this in the R shell/command line? $ more /tmp/iterf.r f1 - function(n = 10, l = 10)

Re: [R] scripting/littler: How to call function named iteratively (`f1`, `f2`, …)?

2011-07-29 Thread Eik Vettorazzi
Hi Paul, how about this for (i in 1:2) { print( do.call(paste(f,i,sep=),list(2, 3) )) } or using get for (i in 1:2) { print( get(paste(f,i,sep=))(2, 3) ) } cheers Am 29.07.2011 15:28, schrieb Paul Menzel: Dear R folks, wanting to compare different implementations of a solution I want to

Re: [R] scripting/littler: How to call function named iteratively (`f1`, `f2`, …)?

2011-07-29 Thread David Winsemius
On Jul 29, 2011, at 9:28 AM, Paul Menzel wrote: Dear R folks, wanting to compare different implementations of a solution I want to script it to iterate over the different implementations. Is there a way to do this in the R shell/command line? You might consider examining the short and