Description Usage Arguments Value See Also
Sometimes you just want to know how long something took. There are many more elaborate solutions for more formal benchmarking (like microbenchmark), but for some applications you don't want to repeat an action or do formal benchmarking. This function simply evaluates the expression in 'expr' and outputs the time taken as a 'message'.
1 |
expr |
An expression to be evaluated. |
message |
A string describing what you're doing. This will be appended to the start of the printed message. For example, if you set 'message = "run things"' the output will look like 'Time taken to run things: 5.15 seconds'. |
The result of evaluating 'expr' in the environment from which 'run_time' was called.
'system.time' base R solution with more basic output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.