scoreBarchart_decisions: Create a bar chart with scores per decision

Description Usage Arguments Value

View source: R/scoreBarchart_decisions.R

Description

Create a bar chart with scores per decision

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
scoreBarchart_decisions(
  estimatesByDecision,
  estimateCol,
  fill = "black",
  strokeColor = "black",
  strokeSize = 0.1,
  title = "MDMCDA decisions bar chart",
  xLab = "Decisions",
  yLab = estimateCol,
  decisionOrder = NULL,
  decisionLabels = NULL,
  xLabelRotationAngle = 45,
  verticalPlot = FALSE,
  theme = ggplot2::theme_minimal(base_size = mdmcda::opts$get("ggBaseSize")),
  guides = ggplot2::guide_legend(nrow = 2),
  legend.position = "top",
  legend.box.margin = ggplot2::margin(0.5, 0.5, 0.5, 0.5, "cm")
)

Arguments

estimatesByDecision

An 'estimatesByDecision' object as created by [aggregate_estimates_by_decision()].

estimateCol

The column name with the estimates to use.

fill

The color to use to fill the bars, if not by criterion cluster.

strokeColor, strokeSize

The color and pen width of the stroke.

title, xLab, yLab

The title and x and y axis labels.

decisionOrder

The order of the decisions, a vector with decision identifiers.

decisionLabels

The decision labels, a names vector where every element if a label and the corresponding name the decision identifier.

xLabelRotationAngle

THe angel to rotate the x axis labels.

verticalPlot

Whether to plot vertically.

theme

The 'ggplot2' theme to use.

guides

A guides argument to tweak the legend.

legend.position, legend.box.margin

The position and spacing for the legend.

Value

A 'ggplot2' plot.


Matherion/mdmcda documentation built on Dec. 31, 2020, 3:13 p.m.