caaqs_management: Calculate CAAQS management levels excluding days with...

View source: R/management.R

caaqs_managementR Documentation

Calculate CAAQS management levels excluding days with Exceptional Events or Transboundary Flows

Description

Calculate CAAQS management levels excluding days with Exceptional Events or Transboundary Flows

Usage

caaqs_management(x, exclude_df = NULL, exclude_df_dt = NULL, quiet = FALSE)

Arguments

x

an object of class caaqs

exclude_df

Data frame. The dates over which data should be excluded (see details). Data should be arranged either with one column of dates to omit, or two columns specifying a series of start and end date ranges to omit.

exclude_df_dt

Character vector. The names of the date columns in exclude_df. Must specify either one (a series of dates), or two (the start and end columns specifying dates ranges).

quiet

Logical. Suppress progress messages (default FALSE)

Details

To omit days which are suspected to be influenced by Transboundary Flows or Exceptional Events create a data frame that either a) contains a column listing all the days which are to be omitted, or b) contains two columns listing the start and end dates of all the date periods which are to be omitted. This is supplied as exclude_df. Use exlcude_df_dt to specify the name of the column containing the dates, or the names of the columns containing the start and end of the date ranges (see examples and vignette for more details).

Value

object of class caaqs

Examples


pm <- pm_24h_caaqs(pm25_sample_data, by = c("ems_id", "site"))

pm

get_caaqs(pm)

# Exclude dates
high_dates <- data.frame(ems_id = "0310162",
                         site = "Port Moody Rocky Point Park", 
                         date = seq(as.Date("2012-06-11"),
                                    as.Date("2012-06-30"), by = "1 day"))
                                    
pm_ex <- caaqs_management(pm, exclude_df = high_dates, exclude_df_dt = "date")

pm_ex

get_caaqs(pm_ex)


bcgov/rcaaqs documentation built on Dec. 12, 2023, 9:21 a.m.