Description Usage Arguments Value Note Examples
View source: R/dec_time2nice_time.R
Goes from hours.fraction format to hours:minutes.
1 | dec_time2nice_time(dec_times, clock = "12hr")
|
dec_times |
A numeric vector with length >= 1, and values in the interval [0,24]. |
clock |
A character vector specifying if you want a 12-hour clock
( |
A character vector with the converted times.
If clock == "12hr"
, either "AM"
or "PM"
will be included at the end of the character string in each element.
Any cases where dec_times == 0 | dec_times == 24
will be
converted to "12:00AM"
if clock == "12hr"
and
"0:00"
if clock == "24hr"
.
1 2 | dec_time2nice_time(c(2.25, 14.55), "12hr")
dec_time2nice_time(c(2.25, 14.55), "24hr")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.