realtime_add_local_datetime: Add local datetime column to realtime tibble

Description Usage Arguments Details Examples

View source: R/realtime.R

Description

Adds local_datetime and tz_used columns based on either the most common timezone in the original data or a user supplied timezone. This function is meant to used in a pipe with the realtime_dd() function.

Usage

1

Arguments

.data

Tibble created by realtime_dd

set_tz

A timezone string in the format of OlsonNames()

Details

Date from realtime_dd is supplied in UTC which is the easiest format to work with across timezones. This function does not change Date from UTC. Rather station_tz specifies the local timezone name and is useful in instances where realtime_add_local_datetime adjusts local_datetime to a common timezone that is not the station_tz. This function is most useful when all stations exist within the same timezone.

Examples

1
2
3
4
5
6
## Not run: 

realtime_dd(c("08MF005","02LA004")) %>%
 realtime_add_local_datetime()

## End(Not run)

ropensci/tidyhydat documentation built on Sept. 20, 2021, 11:50 a.m.