sankeyPlot: Sankey plot from sankeyDt, produced by getSankeyData()

View source: R/non_Seurat_related.R

sankeyPlotR Documentation

Sankey plot from sankeyDt, produced by getSankeyData()

Description

version: 2.0 define flow color as source//done depend getSankeyData()

Usage

sankeyPlot(sankeyDt, colors = NULL)

Arguments

sankeyDt

dataset produced by getSankeyData

colors

a color list for sankeyDt$node$node

Examples

getSankeyData( table(mtcars$gear, mtcars$carb))
sankeyDt2=getSankeyData(table(mtcars$gear, mtcars$carb),"Gear_", "Carb_")
sankeyPlot(sankeyDt2 )
sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="source") )
sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="target") )
sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="static") )

library(RColorBrewer);
mypalette_1=brewer.pal(8,"Set1")
sankeyPlot(sankeyDt2, colors=mypalette_1 )

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