hm

0th

Percentile

Create a period with the specified number of hours and minutes

Transforms a character or numeric vectors into a period object with the specified number of hours and minutes. Arbitrary text can separate hours and minutes.

Keywords
period
Usage
hm(..., quiet = FALSE)
Arguments
...
character or numeric vectors of hour minute pairs
quiet
logical. When TRUE function evalueates without displaying customary messages.
Value

  • a vector of class Period

See Also

hms, ms

Aliases
  • hm
Examples
x <- c("09:10", "09:02", "1:10")
hm(x)
# [1] 9 hours and 10 minutes   9 hours and 2 minutes   1 hour and 10 minutes
hm("7 6")
# [1] 7 hours and 6 minutes
hm("6,5")
# [1] 6 hours and 5 minutes
Documentation reproduced from package lubridate, version 1.3.0, License: GPL

Community examples

Looks like there are no examples yet.