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()
)
a data.frame
containing signature group and other categorical groups.
length-1 character showing the column to flow, typically a signature group.
character vector showing colnames of other groups.
default if FALSE
, if TRUE
, showing signature group.
length-1 string to fill NA, default is FALSE
.
the title.
label for x axis.
label for y axis.
theme for plotting, default is cowplot::theme_minimal_hgrid()
.
a ggplot
object
# \donttest{
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
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_fit_text()`).
p2 <- show_group_mapping(data,
col_to_flow = "Group1", cols_to_map = colnames(data)[-1],
include_sig = TRUE
)
p2
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_fit_text()`).
# }