add_GMT_time: Add a column of GMT time to a cyan data query

Description Usage Arguments Value Examples

View source: R/database.R

Description

Give a column of GMT time based on the activity start time and local time zone

Usage

1
add_GMT_time(cyan_data)

Arguments

cyan_data

a data frame from get_cyan_data() with collect = TRUE

Value

cyan_data with an additional character column for time in GMT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Connect to the example database bundled with CyAN
path <- system.file("extdata", "example.db", package = "CyAN")
db_connection <- connect_cyan(path)

#Get all of the chlorophyll and chlorophyll-a data (parameter id P0051 & P0054)
#or the state of Kansas in the year 2016
ks_chl_2016 <- get_cyan_data(db_connection, collect = TRUE,
                             years = 2016,
                             parameters = c("P0051", "P0054"),
                             states = "KS")

#Add the column for GMT time
ks_chl_2016_wGMT <- add_GMT_time(ks_chl_2016)

PatrickEslick/CyAN documentation built on Oct. 2, 2019, 5:50 p.m.