sort_mat {ggbrain}R Documentation

Sort Matrix by Column

Description

Sorts a given matrix by a specific column while retain the elements in each row.

Arguments

x

A matrix to sort

col

A int that indicates the column the matrix should sort by.

Details

This functions sorts a matrix based on one column, keeping the rows together. Note that col should be a zero-based index of x (i.e., first column is 0).

Value

The matrix sorted by values in the specified column.


[Package ggbrain version 0.8.1 Index]