WUX data frame averaging function

Share:

Description

Collapses WUX data frame by averaging over specified factor (column name). The chosen data frame column will disappear after aggregation.

This function is primarly used to average over model runs (see example).

Usage

1
AverageWuxDataFrame(x, INDEX, fun = "mean")

Arguments

x

wux data.frame (returned by models2wux or read.wux.table)

INDEX

character column names from wux data.frame over which aggregation should take place. Those columns will dissapear after aggregation

fun

keyword for aggregation function. Default is mean

Author(s)

Thomas Mendlik thomas.mendlik@uni-graz.at

Examples

1
2
3
4
5
6
7
8
## load WUX and read WUX test data
require(wux)
data(cmip3_2050)

## average over runs
cmip3.avg.runs <- AverageWuxDataFrame(cmip3_2050, "gcm.run")
## average over seasons, runs and subregions
cmip3.avg.all <- AverageWuxDataFrame(cmip3_2050, INDEX = c("gcm.run", "subreg", "season"))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.