Created
August 31, 2018 06:59
-
-
Save jankuc/c4f48b40e10408f995a4a82cfc9b7ef8 to your computer and use it in GitHub Desktop.
How to meassure execution time in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(lubridate) | |
t1 <- Sys.time() | |
# DO STUFF | |
t2 <- Sys.time() | |
time_diff <- difftime(t2, t1, units = 'secs') | |
duration_str <- hms::as.hms(round(time_diff, 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment