Description Usage Arguments Value Author(s) Examples
Order the rows of a matrix according to the values in a certain column.
1 | ordermatrix(input,by)
|
input |
An input matrix. |
by |
A numeric value specifying the column to be ordered. All rows of |
A matrix whose rows are ordered according to the new order of the by
th column.
Angela Bohn angela.bohn at gmail.com
1 2 | input <- matrix(c(4,2,1,3,5,"right","is","This","the","order."),ncol=2)
ordermatrix(input,by=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.