getSankeyData: Make Sankey plot data from a table(paraLeft, paraRight)

View source: R/non_Seurat_related.R

getSankeyDataR Documentation

Make Sankey plot data from a table(paraLeft, paraRight)

Description

ref: https://observablehq.com/ at d3/sankey version: 2.0 define flow color as source//done v2.1 supply 3 color method: static, source, target//done

Usage

getSankeyData(
  tbl1,
  prefix_left = "",
  prefix_right = "",
  colorMethod = "source",
  omitR = NULL,
  omitC = NULL,
  rm.na = T
)

Arguments

tbl1

a table produced by table()

prefix_left

add a prefix to left nodes

prefix_right

add a prefix to right nodes

colorMethod

"static", "source", "target"

omitR

omitR rownames

omitC

omitC column names

omit

omit which rows/paraLeft

Examples

getSankeyData( table(mtcars$gear, mtcars$carb))

DawnEve/GEB documentation built on July 6, 2022, 7:05 p.m.