chordDiagramFromContingencyTable: chordDiagramFromContingencyTable

View source: R/miscPlots.R

chordDiagramFromContingencyTableR Documentation

chordDiagramFromContingencyTable

Description

Plot a bipartite chord diagram (circular Sankey diagram with 2 categories) for a contingency matrix the values of two matrices

Usage

chordDiagramFromContingencyTable(
  contTab,
  chordColorByCol = FALSE,
  cs_rows = colpal.mu.cat,
  cs_columns = colpal.mu.cat,
  ...
)

Arguments

contTab

matrix or table containing the contingency matrix

chordColorByCol

color chords by column instead of by row

cs_rows

color scheme to use for the rows of the matrix

cs_columns

color scheme to use for the rows of the matrix

...

passed on to chordDiagram

Value

nothing of particular interest (include this function while plotting).

Author(s)

Fabian Mueller

Examples

# contingency table of air quality quantile by month
contTab <- with(airquality, table(cut(Temp, quantile(Temp)), Month))
names(dimnames(contTab))[1] <- "quantile"
chordDiagramFromContingencyTable(contTab)

demuellae/muRtools documentation built on Nov. 6, 2024, 9:44 a.m.