plotEvaluation: Creates a plot for the scenario evaluation.

Description Usage Arguments Examples

View source: R/output.R

Description

This function generates a plot for the data returned by calculateScenarios. It plots a line diagram, where the x-Axis lists the different values of one dimension.

Usage

1
2
plotEvaluation(data, configuration, dimensionx, dimensionxvals,
  relevantForLegend = NULL, maxy = 14)

Arguments

data

list of lists representing the data to be plotted Each top level list represents one scenario. This is the return of @method calculateScenarios().

configuration

list of lists representing the initial scenarios. This should not include multiple entries based on the x-scale.

dimensionx

string the label of the x-axis.

dimensionxvals

vector representing the values of the x-axis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
xdimensionvals = c(0.2,0.5)
elem1 <- list(occupancyrate = .8, quota = .3, nStudents = 2700, nColleges = 600,
              areasize = 7, conf.s.prefs = c(3,7,10,10), horizontalscenario = 1)
elem2 <- list(occupancyrate = .8, quota = .3, nStudents = 600, nColleges = 200,
              areasize = 6, conf.s.prefs = c(2,5,6,7), horizontalscenario = 1)
elements <- list(elem1, elem2)
scenarios <- lapply(elements, function(elem) {
   lapply(xdimensionvals, function(x){
      elem$threshold <- x
      elem
   })
})

xdata <- calculateScenarios(scenarios, nruns=2)
plotEvaluation(xdata, elements, "Threshold", xdimensionvals)

tobiasreischmann/matchingmarketsevaluation documentation built on April 25, 2020, 12:58 a.m.