trafficlight: trafficlight

View source: R/trafficlight.R

trafficlightR Documentation

trafficlight

Description

Function to perform an automatic validation routine

Usage

trafficlight(x, xc, plot = TRUE, ...)

Arguments

x

model output which should be tested in magclass format

xc

comparison data on which x should be tested (magclass format)

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.

...

Additional arguments provided to TLplot

Details

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

Value

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

Author(s)

Markus Bonsch, Jan Philipp Dietrich, Benjamin Leon Bodirsky

See Also

TLevaluate,TLstatistics,TLplot

Examples

library(magclass)
data("population_magpie")
x <- population_magpie
xc <- x + runif(length(x)[1],0,10^5)

trafficlight(x[,,1], xc)
trafficlight(x[,,1], xc, detailed=FALSE)

pik-piam/trafficlight documentation built on Jan. 27, 2024, 5:32 a.m.