Learn R Programming

ggalign (version 0.0.5)

align_group: Group and align observations based on a group vector

Description

[Stable]

Splits observations into groups, with slice ordering based on group levels.

Usage

align_group(
  group,
  active = NULL,
  set_context = deprecated(),
  name = deprecated()
)

Value

A "AlignGroup" object.

Arguments

group

A character define the groups of the observations.

active

A active() object that defines the context settings when added to a layout.

set_context

[Deprecated] Please use active argument instead.

name

[Deprecated] Please use active argument instead.

Examples

Run this code
set.seed(1L)
small_mat <- matrix(rnorm(81), nrow = 9)
ggheatmap(small_mat) +
    anno_top() +
    align_group(sample(letters[1:4], ncol(small_mat), replace = TRUE))

Run the code above in your browser using DataLab