NowCast_PM: Calcualte particulate matter NowCast

Description Usage Arguments Value References Examples

View source: R/NowCast_PM.R

Description

The function returns the weighted mean of exctly 12 given PM raw values, as defined by the United States Environmental Protection Agency (EPA)[1].

Usage

1
NowCast_PM(x, norm = "PM10", raw = FALSE, latex_cellcolors = TRUE)

Arguments

x

A numeric vector of length 12, being the PM raw values of the past 12 hours, with the last being the most recent one.

norm

One value of either "PM10" or "PM2.5", setting the PM size of the given values of x.

raw

Logical, if true returns only the NowCast raw value.

latex_cellcolors

Logical, if true the "NowCast_color_*" columns will show LaTeX \cellcolor code instead of HTML colors. See Colors section of AQI_US_PM.

Value

If raw=TRUE, a numeric vector with the raw NowCast values. Otherwise a data frame with four columns: NowCast raw value (weighted mean of input data), AQI raw value, AQI level (factor), recommended color code (factor). The column names start with "NowCast_raw_", "NowCast_AQI_", "NowCast_AQI_level_", and "NowCast_AQI_color_", and end with either "PM10" or "PM2_5", depending on the value of norm.

References

[1] https://en.wikipedia.org/wiki/NowCast_(air_quality_index)

Examples

1
NowCast_PM(c(50, 80, 75, 90, 82, 53, 64, 74, 21, 10, 16, 13))

unDocUMeantIt/paRticulates documentation built on Jan. 20, 2020, 5:15 p.m.