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.

Usage

sort_mat(x, col)

Arguments

x

A matrix to sort

col

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

Details

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.

Value

The matrix sorted by values in the specified column.


SMAC-Group/simts documentation built on Sept. 4, 2023, 5:25 a.m.