timing | R Documentation |
Similar to system.time()
but returns a more convenient 'difftime' object
with the overall timing (details are stored in the details
attribute).
timing(expr, gc.first = TRUE)
expr |
Valid R expression to be timed. If missing, |
gc.first |
Logical - should a garbage collection be performed immediately
before the timing? Default is |
system.time()
, proc.time()
test <- timing(Sys.sleep(0.5))
test
attr(test, "details")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.