Skip to content
Prev 275482 / 398506 Next

R for loop nested?

In what way doesn't this work?

You declare xx with one element and it prints.

Then on the next loop, you add another element, and it prints them both.

Then on the next loop, you add another element, and it prints all three.

And so on...

If you look at the output, you can see that it's a growing vector.
Perhaps you just mean to put print(xx) outside the loop to only get
the single final answer.

Michael

PS -- Those are multiple matrices, not just a single "crazy matrix."
On Tue, Oct 25, 2011 at 8:19 AM, Delia Shelton <delsshel at indiana.edu> wrote: