weather_lag: Weather lag function creator

Description Usage Arguments Value Functions Examples

View source: R/weather_lag.R

Description

The aim of weather_lag is to provide functions to compute the the roll mean of pollutant mean daily concentrations, including necessary NA at the beginning.

Usage

1
2
3
4
5
weather_lag(x, k, na.rm = TRUE)

weather_lag01(x, na.rm = TRUE)

weather_lag03(x, na.rm = TRUE)

Arguments

x

[num] numerical vector representig a weather daily mean recording

k

[int] an integer of lenght one indicating how many days befor the actual (included) has to be considered for the mean

na.rm

[lgl] should NA be ignored when computed the roll mean? (default is TRUE)

Value

a numerical vector of the same lenght of x with the roll mean computed (and the first k - 1 entries filed with NA).

Functions

Examples

1
2
3
4
5
6
7
imthcm:::weather_lag(c(1, 2, 3, 4, 5, 6), 2)
imthcm:::weather_lag(c(NA, 2, 3, 4, 5, 6), 2)
imthcm:::weather_lag(c(NA, NA, 3, 4, 5, 6), 2)
imthcm:::weather_lag(c(1, NA, 3, 4, 5, 6), 2)
imthcm:::weather_lag(c(1, 2, 3, 4, 5, 6), 4)
imthcm:::weather_lag01(c(1, 2, 3, 4, 5, 6))
imthcm:::weather_lag03(c(1, 2, 3, 4, 5, 6))

UBESP-DCTV/imthcm documentation built on Dec. 2, 2019, 9:26 a.m.