You could do it like this:
iterations = 10
variables = 2
output <- matrix(ncol=variables, nrow=iterations)
for(i in 1:iterations){
output[i,] <- runif(2)
}
output
and then turn it into a data.frame
output <- data.frame(output)
class(output)
what this does:
- create a matrix with rows and columns according to the expected growth
- insert 2 random numbers into the matrix
- convert this into a dataframe after the loop has finished.