On 11/09/2010 09:16 PM, vicho wrote:
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...
What exactly are you trying to do? Where does "true" get set? Did you mean TRUE? We need more information. 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
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.