pretty_dt: Pretty formatting of time intervals (difftime objects)

pretty_dtR Documentation

Pretty formatting of time intervals (difftime objects)

Description

Pretty formatting of time intervals (difftime objects)

Usage

pretty_dt(dt, compact = FALSE)

Arguments

dt

A difftime object, a vector of time differences.

compact

If true, then only the first non-zero unit is used. See examples below.

Value

Character vector of formatted time intervals.

See Also

Other time: pretty_ms(), pretty_sec()

Examples

pretty_dt(as.difftime(1000, units = "secs"))
pretty_dt(as.difftime(0, units = "secs"))

gaborcsardi/prettyunits documentation built on March 8, 2024, 3:47 p.m.