Pretty formatting of time intervals (difftime objects)
pretty_dt(dt, compact = FALSE)
A difftime object, a vector of time differences.
difftime
If true, then only the first non-zero unit is used. See examples below.
Character vector of formatted time intervals.
Other time: pretty_ms; pretty_sec
pretty_ms
pretty_sec
# NOT RUN { pretty_dt(as.difftime(1000, units = "secs")) pretty_dt(as.difftime(0, units = "secs")) # }
Run the code above in your browser using DataCamp Workspace