messy_datetime_tzones | R Documentation |
Takes any number of datetime columns and changes their timezones either totally at random, or from a user-provided list of timezones.
messy_datetime_tzones(data, cols = NULL, tzones = OlsonNames(), force = FALSE)
data |
input dataframe |
cols |
set of columns to apply transformation to. If |
tzones |
Valid time zones to sample from. By default samples from all
|
force |
By default ( |
a dataframe the same size as the input data.
Jack Davison
Other Messy date(time) functions:
messy_datetime_formats()
,
split_datetimes()
data <- data.frame(dates = rep(Sys.time(), 10))
data$dates
attr(data$dates, "tzone")
messy <- messy_datetime_tzones(data, tzones = "Poland")
messy$dates
attr(messy$dates, "tzone")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.