Skip to content
Prev 12390 / 398502 Next

Summary of variations in how long commands take

Thanks to Guido Masarotto, Brain Ripley and Andy Liaw for (remarkably) quick
answers to my (stupid!) question. As all three noted, I should be using
system.time() instead of proc.time().

Andy also noted that he used constructions like:

my.f <- function(x) {
start <- proc.time()
[some steps]
now <- proc.time()
cat("first step took ",now-start," seconds.\n")
etc.
}

to examine timing within a given function. 

Thanks again for a marvelous program. 

Regards,

Dave Kane
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._