seconds.to.hms: Converts a time value given as number of seconds since...

Description Usage Arguments Value See Also Examples

View source: R/seconds_to_hms.R

Description

This function is very similar to strftime with the %X conversion specification. Hour values larger than 24 are permitted. Fractions will be rounded down to the next integer. Non-numeric values are coerced to NA with a warning.

Usage

1

Arguments

x

A (vector of) numbers.

Value

A (vector of) character values of the same length as x.

See Also

strftime

Examples

1
2
3
seconds.to.hms(c(1, 60, 3600.5))
seconds.to.hms(c(100000, -4000.5))
seconds.to.hms("invalid")

Example output

`seconds.to.hms()` is deprecated, use `hms::as.character()()` instead.
[1] "00:00:01" "00:01:00" "01:00:00"
[1] "27:46:40"  "-01:06:41"
[1] NA
Warning message:
In seconds.to.hms("invalid") : NAs introduced by coercion

kimisc documentation built on May 2, 2019, 6:09 p.m.