I would like to construct a dataframe row-by-row in R. I\'ve done some searching, and all I came up with is the suggestion to create an empty list, keep a list index scalar,
One can add rows to NULL:
NULL
df<-NULL; while(...){ #Some code that generates new row rbind(df,row)->df }
for instance
df<-NULL for(e in 1:10) rbind(df,data.frame(x=e,square=e^2,even=factor(e%%2==0)))->df print(df)