View source: R/utils_coerce_time_class.R
utils_coerce_time_class | R Documentation |
Coerces Vector to a Given Time Class
utils_coerce_time_class(x = NULL, to = "POSIXct")
x |
(required, vector of class Date or POSIXct) time vector to convert. Default: NULL |
to |
(required, class name) class to coerce |
time vector
Other internal_time_handling:
utils_as_time()
,
utils_is_time()
,
utils_new_time()
,
utils_time_keywords()
,
utils_time_keywords_dictionary()
,
utils_time_keywords_translate()
,
utils_time_units()
x <- utils_coerce_time_class(
x = c("2024-01-01", "2024-02-01"),
to = "Date"
)
x
class(x)
x <- utils_coerce_time_class(
x = c("2024-01-01", "2024-02-01"),
to = "POSIXct"
)
x
class(x)
x <- utils_coerce_time_class(
x = c("2024-01-01", "2024-02-01"),
to = "numeric"
)
x
class(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.