Learn R Programming

AirMonitor (version 0.4.2)

monitor_dailyStatistic: Create daily statistics for each monitor in an mts_monitor object

Description

Daily statstics are calculated for each time series in monitor$data using FUN and any arguments passed in ....

Because the returned mts_monitor object is defined on a daily axis in a specific time zone, it is important that the incoming monitor contain timeseries associated with a single time zone.

Usage

monitor_dailyStatistic(
  monitor = NULL,
  FUN = mean,
  na.rm = TRUE,
  minHours = 18,
  dayBoundary = c("clock", "LST"),
  ...
)

Value

A mts_monitor object containing daily statistical summaries. (A list with meta and data dataframes.)

Arguments

monitor

mts_monitor object.

FUN

Function used to create daily statistics.

na.rm

Value passed on to FUN. If FUN does not use na.rm, this should be set to NULL.

minHours

Minimum number of valid hourly records per day required to calculate statistics. Days with fewer valid records will be assigned NA.

dayBoundary

Treatment of daylight savings time: "clock" uses daylight savings time as defined in the local timezone, "LST" uses "local standard time" all year round.

...

Additional arguments to be passed to FUN.

Examples

Run this code
library(AirMonitor)

Carmel_Valley %>%
  monitor_dailyStatistic(max) %>%
  monitor_getData()

Carmel_Valley %>%
  monitor_dailyStatistic(min) %>%
  monitor_getData()

Run the code above in your browser using DataLab