sortrows | R Documentation |
Sort rows of a matrix according to values in a column.
sortrows(A, k = 1)
A |
numeric matrix. |
k |
number of column to sort the matrix accordingly. |
sortrows(A, k)
sorts the rows of the matrix A
such that
column k
is increasingly sorted.
Returns the sorted matrix.
sort
A <- magic(5)
sortrows(A)
sortrows(A, k = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.