Skip to contents

Group and align layout based on categorical or factor levels.

Usage

align_group(group, set_context = FALSE, name = NULL)

Arguments

group

A character define the groups, this will split the axis into different panel.

set_context

A single boolean value indicates whether to set the active context to current plot. If TRUE, all subsequent ggplot elements will be added into this plot.

name

A string of the plot name. Used to switch the active context in hmanno() or stack_active().

Value

A new Align object.

Examples

small_mat <- matrix(rnorm(81), nrow = 9)
ggheatmap(small_mat) +
    hmanno("top") +
    align_group(sample(letters[1:4], ncol(small_mat), replace = TRUE))