add_aggrType: add_aggrType

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/add_aggrType.R

Description

Function to add new functions for data aggregation to the library.

Usage

1
add_aggrType(name,func,overwrite=FALSE,internal=FALSE,svn_path="http://subversion/svn/magpie/libraries/")

Arguments

name

Name of the aggregation performed with func.

func

Aggregation function.

overwrite

Boolean. Set to true if you want to overwrite the function of an existing aggregation routine.

internal

Boolean. By default (FALSE) the library is checked out, updated and committed. If TRUE, only the valdata object in the workspace is modified.

svn_path

Path of the svn repository.

Details

This function adds new aggregation routines to the validation library. Such a routine consists of an aggregation function func and a corresponding name. The routines are seved in valdata$aggr_types.

Value

Returns 1 in case of errors, 0 otherwise.

Author(s)

Markus Bonsch

See Also

validationPlot,addData,addMapping,getData

Examples

1
2
3
4
## Not run: 
add_aggrType(func=function(x,weight){mean(x*weight,na.rm=T)},name="mean")

## End(Not run)

pik-piam/validation documentation built on Nov. 5, 2019, 12:50 a.m.