View source: R/aggregateVALUE.R
aggregateVALUE | R Documentation |
Aggregates a grid along the target dimensions through aggregation function specification.
aggregateVALUE(valueObj, aggr.m = list(FUN = "mean", na.rm = TRUE))
valueObj |
A VALUE object to be aggregated. |
aggr.m |
Monthly aggregation function. A list indicating the name of the aggregation function in first place, and other optional arguments to be passed to the aggregation function. See the examples. |
Currently only the temporal monthly aggregation is implemented
A VALUE object aggregated along the chosen dimension(s).
J. Bedia
## Not run:
obs.file <- file.path(find.package("VALUE"),
"example_datasets",
"VALUE_ECA_86_v2.zip")
tmin.DJF.daily <- loadValueStations(obs.file, "tmin",
season = c(12,1,2), years = 1970:2008)
# Monthly means:
tmin.DJF.monthlyMean <- aggregateVALUE(tmin.DJF.daily, aggr.m = list(FUN = "mean", na.rm = TRUE))
# Other functions can be introduced by the user. E.g., monthly median:
tmin.DJF.monthlyMedian <- aggregateVALUE(tmin.DJF.daily,
aggr.m = list(FUN = "quantile", probs = .5, na.rm = TRUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.