movave.effect {MetGen} | R Documentation |
Moving average
Description
Averaging previous time steps using different bandwidth to perform temporal auto-correlation
Usage
movave.effect(var.mat, var.name, bw, nstat = NULL, na.proc = FALSE)
Arguments
var.mat |
Data frame containing chron variable and different climatic variables for each time step |
var.name |
character object to define the name of the climatic variable that we will perform the moving average |
bw |
Numeric vector that forms the bandwidth to be used for the moving average |
nstat |
Numeric vector specifying the number of gauged stations used to obtain observation data |
na.proc |
A logical value indicating whether NA values should be stripped before the computation proceeds |
Value
An additional column will be added in the data frame introduced containing the average of the variable of interest over previous time step specified by the bandwith for each site
Examples
temp_movave <- movave.effect(myclimatic_data, "temp", 48, nstat = 3,
na.proc = TRUE)
[Package MetGen version 0.5 Index]