calculate_pollutant_ratio: Calculate average pollutant ratios using linear model

Description Usage Arguments Value

Description

Calculate average pollutant ratios using linear model

Usage

1
calculate_pollutant_ratio(df.list, avg.time, statistic, sites = FALSE)

Arguments

df.list

List of data frames of observation data for each pollutant in the ratio. First element of list should be data frame for the pollutant which is the numerator in the ratio (second element should be for the denominator pollutant). Both data frames should contain the variables date, site_code, value.

avg.time

Character vector specifying the time period over which to average the data. Option are 'year' or 'month' (to return the annual/monthly average)

statistic

The statistic to use for averaging. Options are 'mean' or 'median'.

sites

Logical indicating whether averaging should be grouped by site (TRUE) or data should be averaged over all sites (FALSE).

Value

Data frame of annual/monthly average concentration data for the pollutant ratio


pollylang/aqtrends documentation built on May 20, 2019, 8:24 p.m.