messy_datetime_tzones {messy} | R Documentation |
Change the timezone of datetime columns
Description
Takes any number of datetime columns and changes their timezones either totally at random, or from a user-provided list of timezones.
Usage
messy_datetime_tzones(data, cols = NULL, tzones = OlsonNames(), force = FALSE)
Arguments
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 ( |
Value
a dataframe the same size as the input data.
Author(s)
Jack Davison
See Also
Other Messy date(time) functions:
messy_datetime_formats()
,
split_datetimes()
Examples
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")
[Package messy version 0.1.0 Index]