transform_dates_with_time_zone: Function to transform potentially heterogeneous time zones...

View source: R/transform_dates_with_time_zone.R

transform_dates_with_time_zoneR Documentation

Function to transform potentially heterogeneous time zones and force their representation in the UTC time zone.

Description

transform_dates_with_time_zone is useful when time series are represented in a single time zone, but different groups are better analysed in different time zones. transform_dates_with_time_zone will return transformed dates with the UTC time zone, but this may not strictly be true.

Usage

transform_dates_with_time_zone(
  df,
  dates_replace = TRUE,
  drop_time_zone = FALSE
)

Arguments

df

Tibble with date and time_zone variables.

dates_replace

Should the function replace/overwrite the original date variable(s) with the transformed version?

drop_time_zone

Should the helper time_zone variable be dropped in the return?

Value

df with transformed date variables.

Author(s)

Stuart K. Grange


skgrange/threadr documentation built on Feb. 17, 2025, 9:08 p.m.