Re: [R] Saving each output of a loop into something that can be graphed

2009-10-05 Thread John Kane
Define a matrix to hold the data and insert it into the loop? Something like mymat <- matrix(rep(NA, 20), nrow=10) for(i in 1:10){ a <- i b <- i+1 mymat[i,] <- c(a,b) } matplot(mymat) --- On Mon, 10/5/09, RR99 wrote: > From: RR99 > Subject: [R] Saving each out

[R] Saving each output of a loop into something that can be graphed

2009-10-04 Thread RRRRRR99
Hi, from the code below; whats happening is i want to plot how the [1,9] entry changes as the matrx changes, print[] gives the values one after the other, but only the last value is saved so my graph has only one point. does anyone know how i can merge all the outputs into one dataframe or somet