This function takes a numeric input vector, converts them to an hms (using
hms::as_hms()), then to a POSIXlt (using base::as.POSIXlt()), and then
formats is according to the format argument.
Usage
style_time(x, format = "%H:%M")
Value
a character vector of length(x)
Arguments
x
a numeric vector to be styled
format
output format. Defaults to "%H:%M", which results in, e.g., "03:45". Look to base::strptime() for formatting options.
#collect some time infotime <-
sample.data.irregular |>
dplyr::slice(300:305) |>
dplyr::pull(Datetime)
#Output is of type POSIXcttime
time |> style_time()