[R] How can I optimize this piece of code ?

From: Daren Tan <daren76_at_hotmail.com>
Date: Mon, 07 Jul 2008 09:17:48 +0000

Currently it needs 50+ mins to run on a 800000 rows. I need to run it hundreds of times :P  

t(apply(unique_ids, 1, function(x) { sd(subset(m[, 5:20], m[,"ID"] == x)) } ))            


        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
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. Received on Mon 07 Jul 2008 - 09:21:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Jul 2008 - 10:31:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive