Description Usage Arguments Value Examples
Calculate seasonal means from data.table
1 | SeasonalMean(data, season, variable = "value", na.rm = FALSE)
|
data |
data table containing the columns date (Date object) and value (the variable) |
season |
string descripting the season to average, e.g., 'DJF' |
na.rm |
a logical value indicating whether 'NA' values should be stripped before the computation proceeds. |
data table with seasonal averaged values.
1 2 3 4 5 6 | mydata <- data.frame(date = seq.Date(as.Date('1990-01-01'),
as.Date('2000-12-31'),
by = '1 months'),
value = rnorm(11*12))
SeasonalMean(mydata, 'DJF')
SeasonalMean(mydata, 'DJFMAM')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.