Re: [R] Thank you your help and one more question.

2013-01-28 Thread arun
HI, How do you want to combine the results? It looks like the 5 datasets are list elements. If I take the first three list elements, imput1_2_3<-list(imp1=structure(list(ID = c("HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001",

Re: [R] Thank you your help and one more question.

2013-01-28 Thread arun
Hi, I think I understand your mistake. imput1_2_3<-list(imp1=structure(list(ID = c("HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001", "HM001"), CTIME = 1223:1237, WEIGHT = c(24.9, 25.2, 25.5, 25.24132, 25.7, 27.1, 27.3, 27

Re: [R] Thank you your help and one more question.

2013-01-28 Thread arun
HI, I don't have Amelia package installed. If you want to get the mean value, you could use either ?aggregate(),  or ?ddply() from library(plyr) library(plyr) imputNew<-do.call(rbind,imput1_2_3)  res1<-ddply(imputNew,.(ID,CTIME),function(x) mean(x$WEIGHT))  names(res1)[3]<-"WEIGHT"  head(res