reorder | R Documentation |
Reorder a matrix vertically according to a vector of new positions.
reorder(mat, new.order)
mat |
Input matrix. |
new.order |
Vector of integer numbers with the new order of rows. The new order must contain as many elements as the matrix has rows and it must not contain NA values, duplicate entries, or gaps. |
This function takes a matrix and reorders its rows based on a vector of new positions.
Reordered matrix.
Philip Leifeld
matrixreg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.