bio_sankey | R Documentation |
Creates a sankey plot with heatmaps showing how individuals progress over time.
bio_sankey(samp.order)
samp.orders |
A list of named vectors for sample order at each timepoint. Vector names must correspond to matchable ids. |
library(survival) data(kidney) df <- kidney library(lme4) data(sleepstudy) data = sleepstudy data = data[data$Days !=1 | data$Subject != "308", ] time.col="Days" exp.cols = "Reaction" sub.col = "Subject" row.order=list() for(i in unique(data[, time.col])){ hm = Heatmap(data[data[, time.col] == i, exp.cols], cluster_rows=cluster) row.order[[paste('timepoint', as.character(i))]] = setNames(unlist(row_order(hm)), data[data[, time.col] == i, sub.col]) } bio_sankey(samp.order=row.order)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.