I am a beginner in R and I have not been able to find a solution to this anywhere online.
I have a list object that is composed of 50 dataframes. I want to split this list into separate data.frame
objects, but am having trouble doing this.
It's simple to do manually:
a<-list[[1]]
but I want to loop it so that I don't have to manually enter all 50 components. This does not work:
for(i in 1:n.imp)
a.i<-comb.txt1[[i]]
because it only produces a single (the last) dataframe.
Any thoughts?
Here is some additional context: This list is the product of a multiple imputation procedure -- mi(). I want to merge a new variable into each of these imputed datasets, but can't seem to figure out how to do that, since the object is a list.