average_data: Average raw hourly data by year or month-year

Description Usage Arguments Value

Description

Average raw hourly data by year or month-year

Usage

1
2
average_data(df, avg.time = "year", statistic = "mean",
  sites = FALSE, date.format = FALSE)

Arguments

df

Data frame containing 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


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