Description Usage Arguments Value Functions Examples
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.
1 2 3 4 5 | weather_lag(x, k, na.rm = TRUE)
weather_lag01(x, na.rm = TRUE)
weather_lag03(x, na.rm = TRUE)
|
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 |
a numerical vector of the same lenght of x with the
roll mean computed (and the first k - 1 entries filed
with NA).
weather_lag01: wrapper function to compute
weather_lag with k equal to 2, i.e., the
mean for today and yesterday.
weather_lag03: wrapper function to compute
weather_lag with k equal to 4, i.e., the
mean for today and three prevous day.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.