[R] Loop
Florian Weiler
fweiler08 at jhubc.it
Wed Feb 22 14:40:42 CET 2012
Thanks for the answer, and sorry if I was not clear.
So I run the data imputation using mice with 10 chains and then I get a
mids-object. From that object I can then extract 10 data sets using the
complete(imp, n) command (with n=c(1:10)).
Now I can type this out 10 times:
set1 <- complete(imp, 1)
set2 <- complete(imp, 2)
etc.
Each of these set1 to set10 will be a data frame. That all is easy enough,
but I would like to do this in a loop and create the same 10 data sets.
If I use the command proposed by you, then the loop works but again the 10
data sets are stored in only one single object (a list) when I would like to
create 10 separate data sets.
Is that enough information?
Thanks again,
Florian
--
View this message in context: http://r.789695.n4.nabble.com/Loop-tp4409865p4410333.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list