sort_mat | R Documentation |
Sorts a given matrix by a specific column while retain the elements in each row.
sort_mat(x, col)
x |
A |
col |
A |
The functional difference between armadillo's sort() and sort_mat() is straight forward. sort() will sort each column without respect to the rows. Using sort_matrix will sort only 1 column and retain the other elements to be in the same row.
The matrix sorted by values in the specified column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.