Description Usage Arguments Details Value Note Examples
This function inputs date-time values in Coordinated Universal Time (UTC; also known as Zulu Time), along with a vector with county Federal Information Processing Standard (FIPS) codes, and calculates the local date-time as well as the local date based on th UTC date-time.
1 | calc_local_time(date_time, fips, include_tz = TRUE)
|
date_time |
The vector of the date-time of each observation in
Coordinated Universal Time (UTC). This vector can either have a
|
fips |
A character vector giving the 5-digit FIPS code of the county
associated with each observation. This can be either a string of length 1,
if all observations come from the same county, or a vector as long as the
|
include_tz |
A TRUE / FALSE value specifying whether to include a
column with the local time zone ( |
This function inputs date-time values in Coordinated Universal Time (UTC; also known as Zulu Time), as well as a single value or vector of FIPS code(s) for the county associated with each observation. It returns a dataframe with columns for local date-time, local date, and, if specified, local time zone.
This function returns a dataframe with columns for local date-time, local date, and, if specified, local time zone.
The local time is given as a character string, rather than a POSIXct object, so that it can have different time zones for different counties within the same dataframe (i.e., if there are two counties in the dataframe that are in different time zones).
1 2 3 4 5 6 7 8 9 10 | calc_local_time(date_time = "1999-01-01 08:00", fips = "36061")
ex_datetime <- c("1999-01-01 08:00", "1999-01-01 09:00",
"1999-01-01 10:00")
calc_local_time(date_time = ex_datetime, fips = "36061")
ex_datetime <- c("1999-01-01 08:00", "1999-01-01 09:00",
"1999-01-01 10:00")
ex_fips <- c("36061", "17031", "06037")
calc_local_time(date_time = ex_datetime, fips = ex_fips)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.