arrange {matrixset} | R Documentation |
Re-order rows or columns of a matrixset
Description
Orders the rows (arrange_row()
) or columns (arrange_column()
) by
annotation values.
The mechanic is based on sorting the annotation data frame via dplyr
's
dplyr::arrange()
.
This means, for instance, that grouping is ignored by default. You must
either specify the grouping annotation in the sorting annotation, or use
.by_group = TRUE
.
The handling of locales and handling of missing values is also governed by
dplyr's arrange()
.
Usage
arrange_row(.ms, ..., .by_group = FALSE)
arrange_column(.ms, ..., .by_group = FALSE)
Arguments
.ms |
A |
... |
Name of traits to base sorting upon. Tidy selection is
supported. Use |
.by_group |
|
Value
A matrixset
with re-ordered rows or columns, including updated row or
column meta info.
Examples
ms1 <- remove_row_annotation(student_results, class, teacher)
# this would not work
# remove_row_annotation(row_group_by(student_results, class), class)