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

Re: [R] Thank you your help.

2013-01-28 Thread arun
Hi, temp3<- read.table(text=" ID CTIME WEIGHT HM001 1223 24.0 HM001 1224 25.2 HM001 1225 23.1 HM001 1226 NA HM001 1227 32.1 HM001 1228 32.4 HM001 1229 1323.2 HM001 1230 27.4 HM001 1231 22.4236 #changed here to test the previous solution ",sep="",header=TRUE,stringsAsFactors=FALSE)  tempnew<- na.o