| style_time | R Documentation |
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.
style_time(x, format = "%H:%M")
x |
a |
format |
output format. Defaults to "%H:%M", which results in, e.g., "03:45". Look to |
a character vector of length(x)
#collect some time info
time <-
sample.data.irregular |>
dplyr::slice(300:305) |>
dplyr::pull(Datetime)
#Output is of type POSIXct
time
time |> style_time()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.