Dear list, I have the following line of code to extract the last line of the split data and put them back together.
do.call(rbind,lapply(split(simout.s1,simout.s1[c('SID','DOSENO')]),function(x)x[nrow(x),])) the problem is when have a huge dataset, it takes too long to run. (actually it's > 3 hours and it's still running). The dataset is pretty big. I have 200,000 unique SID and 4 DOSENO, so totally 800,000 split dataset. Is there anyway to speed it up? Thanks. Jun [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.