chron (version 2.1-6)

hours: Return Hours, Minutes, or Seconds from a Times Object

Usage

hours(x)
minutes(x)
seconds(x)

Arguments

x
an object inheriting from class "times".

Value

  • the corresponding time period as an ordered factor.

See Also

chron, dates, times

Examples

Run this code
x <- chron(dates = c("02/27/92", "02/27/92", "01/14/92", "02/28/92"),
           times = c("23:03:20", "22:29:56", "01:03:30", "18:21:03"))
h <- hours(x)
y <- runif(4)
boxplot(y ~ h)

Run the code above in your browser using DataCamp Workspace