show_group_mapping {sigminer} | R Documentation |
Map Groups using Sankey
Description
This feature is designed for signature analysis. However, users can also use it in other similar situations.
Usage
show_group_mapping(
data,
col_to_flow,
cols_to_map,
include_sig = FALSE,
fill_na = FALSE,
title = NULL,
xlab = NULL,
ylab = NULL,
custom_theme = cowplot::theme_minimal_hgrid()
)
Arguments
data |
a |
col_to_flow |
length-1 character showing the column to flow, typically a signature group. |
cols_to_map |
character vector showing colnames of other groups. |
include_sig |
default if |
fill_na |
length-1 string to fill NA, default is |
title |
the title. |
xlab |
label for x axis. |
ylab |
label for y axis. |
custom_theme |
theme for plotting, default is |
Value
a ggplot
object
Examples
data <- dplyr::tibble(
Group1 = rep(LETTERS[1:5], each = 10),
Group2 = rep(LETTERS[6:15], each = 5),
zzzz = c(rep("xx", 20), rep("yy", 20), rep(NA, 10))
)
p1 <- show_group_mapping(data, col_to_flow = "Group1", cols_to_map = colnames(data)[-1])
p1
p2 <- show_group_mapping(data,
col_to_flow = "Group1", cols_to_map = colnames(data)[-1],
include_sig = TRUE
)
p2
[Package sigminer version 2.3.1 Index]