On Thu, Feb 12, 2009 at 8:42 AM, Stavros Macrakis <macra...@alum.mit.edu> wrote: > On Thu, Feb 12, 2009 at 4:28 AM, Gavin Simpson <gavin.simp...@ucl.ac.uk> > wrote: >> When I'm testing the speed of things like this (that are in and of themselves >> very quick) for situations where it may matter, I wrap the function call in >> a call >> to replicate(): >> >> system.time(replicate(1000, svd(Mean_svd_data))) >> >> to run it 1000 times, and that allows me to judge how quickly the >> function executes. > > I do the same, but with a small twist: > > system.time(replicate(1000, {svd(Mean_svd_data); 0} ))
You could also do r_ply(1000, svd(Mean_svd_data)) which has the same effect - the results are discarded after each evaluation (as opposed to raply, rlply and rdply where they are kept and returned in various formats) Hadley -- http://had.co.nz/ ______________________________________________ R-help@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.