Kaboom_flow: Kaboom_flow

View source: R/flow.R

Kaboom_flowR Documentation

Kaboom_flow

Description

Kaboom flow is a function for plotting the riverplot or snake plot. Traditional riverplot could not handle unique categories without come and going. this flow chart is designed to achieve to illustrate something like gene mutation through generations. This is based on GGplot

Usage

  Kaboom_flow(TB)

# Quick Start
A <- c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M")
B <- c("A", "B", "C", "D", "E", "F", "K", "L", "M", "N")
C <- c("A", "B", "C", "D", "E", "F", "G", "H", "N","O")

TB = data.frame(row.names =  sort(unique(c(A,B,C))))
Num = 0
for(Col in list(A,B,C)){
    Num = Num + 1
    TB[paste("Group",Num, sep="_")] = 0
    TB[paste("Group",Num, sep="_")][row.names(TB) %in% Col,] = 1
}


Kaboom_flow(TB)


Arguments

data

Data frame

Examples


Kaboom_flow(TB)


Karobben/ggkaboom documentation built on Nov. 18, 2022, 8:03 a.m.