plotIndDist: Static indicator distribution plots

Description Usage Arguments Details Value Examples

View source: R/coin_indplot.R

Description

Plots indicator distributions using box plots, dot plots, violin plots, violin-dot plots, and histograms. Supports plotting multiple indicators by calling aggregation groups.

Usage

1
2
3
4
5
6
7
8
9
plotIndDist(
  COINobj,
  dset = "Raw",
  icodes = NULL,
  aglev = 1,
  type = "Box",
  ntype = NULL,
  npara = NULL
)

Arguments

COINobj

The COIN object, or a data frame of indicator data

dset

The source data set to use for indicator data (if input is COIN object)

icodes

A character vector of indicator names to plot. Defaults to all indicators.

aglev

The aggregation level to extract the indicator data from. Defaults to indicator level (1).

type

The type of plot. Currently supported "Box", "Dot", "Violin", "Violindot", "Histogram".

ntype

The type of normalisation to apply. If NULL, no normalisation applied, otherwise specify using ntype options in normalise().

npara

Optional parameters to pass to normalise() if normalisation required.

Details

This function also optionally normalises indicators so they can be compared more easily side by side. For this purpose it calls normalise() - see ntype and npara arguments.

See COINr online documentation and getIn() for more information on accessing/plotting groups.

Value

Plots generated with ggplot2. These can be edited further with ggplot2 commands.

Examples

1
2
3
4
# build ASEM COIN
ASEM <- assemble(IndData = ASEMIndData, IndMeta = ASEMIndMeta, AggMeta = ASEMAggMeta)
# plot indicators in Physical pillar
plotIndDist(ASEM, type = "Box", dset = "Raw", icodes = "Physical")

COINr documentation built on Nov. 30, 2021, 9:06 a.m.