A function in R that calculates the difference of two times.
A function in r that calculates the difference of two times.
difftime is a function in r that provides creation, printing and some arithmetic for calculating time intervals or time differences.
The signature of difftime is as follows:
difftime(time1, time2, tz, units = c("auto", "secs", "mins", "hours", "days", "weeks"))
See difftime official documentation for more details.