sort_mat: Sort Matrix by Column

View source: R/RcppExports.R

sort_matR 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.


ggbrain documentation built on April 4, 2025, 5:03 a.m.