There are two modes to use wcal, function mode if FUN is not null, and string formula mode if FUN is NULL.

# S4 method for WeaAna
wcal(object, FUN = NULL, ..., var.args = NULL, = NULL)



A WeaAna objects.


A function to be used which results should have the same length as original records.


Optional arguments to FUN in function mode. String formulas if FUN is NULL.


Arguments of weather variable pass to FUN.

Variable name is used if FUN is not NULL.


library(weaana) data( "records" ) # Daily mean temperature wcal( records, avgt2 = "( maxt + mint ) / 2" ) # Moving average temperature wcal( records, FUN = mov.avg, var.args = "avgt", k = 5, shift = "begin", = "mov.avg" )