ordermatrix: Order the rows of a matrix according to the values in a...

Description Usage Arguments Value Author(s) Examples

Description

Order the rows of a matrix according to the values in a certain column.

Usage

1
ordermatrix(input,by)

Arguments

input

An input matrix.

by

A numeric value specifying the column to be ordered. All rows of input will be ordered according to the new order of by.

Value

A matrix whose rows are ordered according to the new order of the byth column.

Author(s)

Angela Bohn angela.bohn at gmail.com

Examples

1
2
input <- matrix(c(4,2,1,3,5,"right","is","This","the","order."),ncol=2)
ordermatrix(input,by=1)

snatm documentation built on May 2, 2019, 5:01 p.m.

Related to ordermatrix in snatm...