trafficLight: trafficLight

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

View source: R/trafficLight.R

Description

Function to perform an automatic validation routine

Usage

1
2
trafficLight(func, ..., historical=TRUE, datasources=NULL, aggregate=TRUE, 
             plot=TRUE, text_size=15, ncol=2)

Arguments

func

Name of the magpie library function for which validation data shall be obtained.

...

Values for arguments that func takes. If an argument is not specified the default value are used if existing. Otherwise an error will occur. The two arguments "file" and "level" can be omitted without causing problems.

historical

Determines what kind of data is taken into account. Either historical data (TRUE), projections (FALSE) or both (NULL).

datasources

A vector containing the names of the datasets that shall be used for comparison. If NULL (default) all datasets are returned.

aggregate

TRUE or FALSE. If TRUE, individual test results are aggregated to one traffic light. If FALSE, individual test results are returned.

plot

TRUE or FALSE. If TRUE, a plot with a visualization of te treffic light is returned. If FALSE, a MAgPIE object with the test result is returned.

text_size

If plot==TRUE, this argument determines the text size in the graph.

ncol

Number of columns if plot is split into multiple facets.

Details

The procedure is explained in detail here: redmine.pik-potsdam.de/projects/magpie-intern/wiki/Traffic_light_validation.

Value

If plot==TRUE, a ggplot object. If plot==FALSE, a MAgPIE obkect with the traffic light result (0 = red, 1 = yellow, 2 = green)

Author(s)

Markus Bonsch

See Also

evaluate_TLstatistics,TLstatistics,plot_TL

Examples

1
2
3
4
## Not run: 
trafficLight(func=emissions,type="co2_c",datasources="FAO",historical=TRUE)

## End(Not run)

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