Skip to content
Prev 97859 / 398500 Next

adding columns to a table after a loop

Albert Picado wrote:
Staying in your example:

a <- 1
b <- matrix(nrow=10, ncol=4)
while(a <= 4){
     b[,i] <- rnorm(10)
     a <- a + 1
}

Uwe Ligges