add_EPA_recreational_threshold: Add EPA recreational threshold

Description Usage Arguments Value Examples

View source: R/database.R

Description

Add a column indicating whether the EPA recreational trehsold was exceeded

Usage

1

Arguments

cyan_data

a data frame from get_cyan_data() with collect = TRUE

Value

cyan_data with an additional column EPA_REC_EXCEEDED - a logical column indicating whether the applicable EPA recreational treshold was exceeded

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#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 data for microcystis and cylindrospermopsin
ks_toxins <- get_cyan_data(db_connection, collect = TRUE,
                             parameters = c("P0073", "P0074"),
                             states = "KS")

#Add any applicable recreational for toxins
ks_toxins_wEPA <- add_EPA_recreational_threshold(ks_toxins)

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