hist.eviSimulation {decisionSupport}R Documentation

Plot Histograms of results of an EVI simulation

Description

This function plots the histograms of the results of eviSimulation.

Usage

## S3 method for class 'eviSimulation'
hist(
  x,
  breaks = 100,
  col = NULL,
  mainSuffix = " welfare simulation result",
  ...,
  colorQuantile = c("GREY", "YELLOW", "ORANGE", "DARK GREEN", "ORANGE", "YELLOW", "GREY"),
  colorProbability = c(1, 0.95, 0.75, 0.55, 0.45, 0.25, 0.05),
  resultName = NULL
)

Arguments

x

An object of class eviSimulation.

breaks

one of:

  • a vector giving the breakpoints between histogram cells,

  • a function to compute the vector of breakpoints,

  • a single number giving the number of cells for the histogram,

  • a character string naming an algorithm to compute the number of cells (see ‘Details’),

  • a function to compute the number of cells.

In the last three cases the number is a suggestion only; as the breakpoints will be set to pretty values, the number is limited to 1e6 (with a warning if it was larger). If breaks is a function, the x vector is supplied to it as the only argument (and the number of breaks is only limited by the amount of available memory).

col

a colour to be used to fill the bars.

mainSuffix

character: Suffix of the main titles of the histograms.

...

Further arguments to be passed to hist.

colorQuantile

character vector: encoding the colors of the quantiles defined in argument colorProbability.

colorProbability

numeric vector: defines the quantiles that shall be distinguished by the colors chosen in argument colorQuantile. Must be of the same length as colorQuantile.

resultName

character: indicating the name of the component of the simulation function (model_function) which results histogram shall be generated. If model_function is single valued, no name needs to be supplied. Otherwise, one valid name has to be specified. Defaults to NULL.

Value

an object of class "histogram". For details see hist.

See Also

eviSimulation, hist. For a list of colors available in R see colors.


[Package decisionSupport version 1.114 Index]