| timer | R Documentation |
Reporting of time elapsed since a given start time, or during the running of an expression.
timer(start.time, digits = 1)
start.time |
A date-time object of class |
digits |
integer value specifying the number of decimal places to |
The function returns a message informing of the time elapsed since the input 'start.time', or during the running of the input expression.
A. Marcia Barbosa
Sys.time, proc.time, difftime
# get starting time:
start <- Sys.time()
# do some random analysis:
x <- sort(rnorm(3e7))
# see how long it took:
timer(start)
# time an expression directly:
timer(x <- sort(rnorm(3e7)))
timer(x <- sort(rnorm(3e7)), digits = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.