time_delta | R Documentation |
Calculate time difference and return a number
time_delta(t1, t2, units = "secs")
t1 |
time start |
t2 |
time end |
units |
character, choices are |
numeric difference of time in units specified
a = Sys.time()
Sys.sleep(0.3)
b = Sys.time()
time_delta(a, b) # In seconds, around 0.3
time_delta(a, b, 'mins') # in minutes, around 0.005
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.