Dear list members,

I'm looking for a way to write "nested" functions similar to the
function "Nest" or "NestList" in Mathematica.

E.g.,

f<-function(x) x+2*x

f(f(f(2)))

might instead be written as nest(f, 2, 3)

read as, nest function f 3 times with 2 as the initial value.

Thanks!

Manuel

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to