View source: R/show_group_mapping.R
show_group_mapping | R Documentation |
This feature is designed for signature analysis. However, users can also use it in other similar situations.
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()
)
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 |
a ggplot
object
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.