Create a list with data needed by buildRadialSetsPlot.

getRadialSetsData(setSizes, setSizesByDegree, setIntersections,
  setOrder = NULL, linkThickness = "prop",
  linkColor = "prop.relError", linkColorPal = "RdBu",
  reverseLinkPal = FALSE, focusSets = "none", countScale = 1,
  colorScaleLim = c(-1, 1), colorScaleMapFun = "squish",
  edgeScaleLim = c(-Inf, Inf), edgeScaleMapFun = "censor",
  edgeWidthRange = c(1, 8), dropSets = FALSE)

Arguments

setSizes

Data frame of set sizes from getSetSizes

setSizesByDegree

Data frame of set sizes by degree from getSetSizesByDegree

setIntersections

Data frame of set intersection sizes from getSetIntersections

setOrder

An optional input to specify order of sets (counterclockwise). Partial ordering is performed using fct_relevel

linkThickness

Character vector specifying name of variable from setIntersections data frame to map to link thickness

linkColor

Character vector specifying name of variable from setIntersections data frame to map to link color

linkColorPal

Name of color palette to use for link colors. Must match palette from brewer.pal

reverseLinkPal

A logical input specifying if color scale should be reversed

focusSets

Character vector specifying name(s) of set(s) to focus on. If single set is specified, only links originating from set are shown. If multiple sets are specified, only links between sets are shown.

countScale

An optional input to apply multiplicative scaling to set sizes

colorScaleLim

A numeric vector specifying upper and lower scale limits on link colors. Scale limits are enforced using censor or squish

colorScaleMapFun

A character string specifying whether to use censor or squish to enforce color scale limits

edgeScaleLim

A numeric vector specifying upper and lower scale limits on edge thickness. Scale limits are enforced using censor or squish

edgeScaleMapFun

A character string specifying whether to use censor or squish to enforce edge thickness limits

edgeWidthRange

A numeric vector specifying minimum and maximum line thickness of links

dropSets

A logical indicating if sets without links should be removed

Value

A list with elements:

  • edgeWidth matrix of link thickness variable (original scale)

  • edgeWidthMap matrix of link thickness mapped to line thickness

  • edgeColor matrix of link color variable (original scale)

  • edgeWidthMap matrix of link color mapped to colors

  • degreeMat matrix of bar sizes

  • sets character vector of set names

  • nSets number of sets

  • maxDegree max degree of overlaps in bar plot

  • setSizesVec vector of set sizes

  • maxWidth maximum width of lines for edges