Re: [R] alternative way to loop

2007-09-11 Thread Duncan Murdoch
On 9/11/2007 8:54 AM, kevinchang wrote: > I heard that if-loop may result in errors if we are going to loop for a lot > of times. I don't know what you mean by an "if-loop", but if doing it lots of times caused an error, that would likely be a bug in R. And I know of no such bug. > And sum()

[R] alternative way to loop

2007-09-11 Thread kevinchang
I heard that if-loop may result in errors if we are going to loop for a lot of times. And sum() can be the alternative way to do this kind of hugbe looping. But I haven't figure out how . Can someone please give me an concrete example of using sum() for this purpose? -- View this message in con