time_factor | R Documentation |
Takes a vector of HH:MM (HH:MM:SS) information and categorizes these by a 4 level factor of time of day.
time_factor(x, time_func = lubridate::hms, tod = time_of_day())
x |
character vector of times |
time_func |
a function to convert x to a lubridate time vector. Default is lubridate::hms |
tod |
list defining when the breakpoints for the various time of day distinctions. |
factor vector
time_factor(c("12:23", "15:59", "22:10", "8:13"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.