arrange: Order matrix elements based on rownames and/or colnames

Description Usage Arguments Details Value Examples

View source: R/manip.R

Description

This is a convenience function for ordering rows and columns within a matrix.

Usage

1
arrange(m, order.rows = TRUE, order.cols = TRUE, comparator = NULL)

Arguments

m

A matrix whose rows and/or columns are to be arranged

order.rows

Whether rows are to be ordered. Defaults to TRUE

order.cols

Whether columns are to be ordered. Defaults to TRUE

comparator

A function to define the ordering. Currently unused

Details

To ensure proper operations are performed, the ordering of rows and columns within matrix operands must be consistent. Arrange conveniently performs this ordering.

In the future, a comparator will be added so that custom orderings can be applied to the function.

Value

A matrix whose rows and/or columns have been ordered. By default, both rows and columns are ordered.

Examples

1
2

zatonovo/futile.matrix documentation built on May 4, 2019, 9:11 p.m.