View source: R/normalize_datetimes.R
normalize_datetime | R Documentation |
This function takes in datetime data that is collected under different timezones, and normalizes them to the same time zone. This function is needed because R does not allow multiple timezones in a vector.
normalize_datetime(
df,
datecol = "SampleStartDate",
timecol = "SampleStartTime",
tzcol = "SampleStartTZ",
target_tz = "America/Los_Angeles",
norm_time_colname = "datetime",
vector_only = FALSE
)
df |
dataframe to modify. |
datecol |
Name of the column that contains date values. |
timecol |
Name of the column that contains time values. |
tzcol |
Name of column that contains timezone values. |
target_tz |
Timezone data should be normalized to. |
norm_time_colname |
Name of column new data should be written to. |
vector_only |
If true, return only a vector of normalized datetimes. IF false, return dataframe with added datetime |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.