Description Usage Arguments Value See Also Examples
Pretty formatting of seconds
1 | pretty_sec(sec, compact = FALSE)
|
sec |
Numeric vector of seconds. |
compact |
If true, then only the first non-zero unit is used. See examples below. |
Character vector of formatted time intervals.
Other time:
pretty_dt()
,
pretty_ms()
1 2 3 4 | pretty_sec(c(1337, 13370, 133700, 1337000, 13370000))
pretty_sec(c(1337, 13370, 133700, 1337000, 13370000),
compact = TRUE)
|
[1] "22m 17s" "3h 42m 50s" "1d 13h 8m 20s" "15d 11h 23m 20s"
[5] "154d 17h 53m 20s"
[1] "~22m" "~3h" "~1d" "~15d" "~154d"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.