I\'m trying to write from a loop to a data frame in R, for example a loop like this>
for (i in 1:20) { print(c(i+i,i*i,i/1))}
and to write
You could use rbind:
d <- data.frame() for (i in 1:20) {d <- rbind(d,c(i+i, i*i, i/1))}