[R] Performing a geometric seqeunce using iterators?
vicho
vicho at Ucla.edu
Wed Nov 10 04:16:46 CET 2010
I want to make a function for geometric seqeunce
since
testing=function(x){i=1;ans=1;while(true){ans=ans+(1/x)^i ; i=i+1}
;return(ans)}
doesn't work... the program is freeze... from my research, i know i should
use iterators.
I read iterators.pdf at
http://cran.r-project.org/web/packages/iterators/iterators.pdf and didnt
find it helps solving my problem at all...
Is there any sources I can look up to?
Thanks
Ting
--
View this message in context: http://r.789695.n4.nabble.com/Performing-a-geometric-seqeunce-using-iterators-tp3035465p3035465.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list