add_climatology {SeaVal} | R Documentation |
Add climatology to a data table
Description
The climatology is the average over years (and members for ensemble forecases), taken separately for each month, season, and coordinate. By default, the average is taken over all years in the data table, but you can change this using the years-argument. By default, climatologies (averages) are calculated for each column that is not recognized as dimension variable and does not contain characters.
Usage
add_climatology(dt, data_cols = NULL, years = NULL, by = dimvars(dt))
Arguments
dt |
the data table. |
data_cols |
For which columns do you want to derive the climatology? The default i |
years |
The average over which years should be considered as climatology. The default is all years in dt. |
by |
column names to group by. |
Value
The provided data table with an extra climatology column
Examples
dt = add_climatology(chirps_monthly)
[Package SeaVal version 1.2.0 Index]