sort_matrix: Sort all columns of matrix x with respect to the j-th column.

Description Usage Arguments Value Examples

View source: R/sort_matrix.R

Description

This function can use the sort.list function in R. The reason for using it is that one wants the sort to carry along all columns.

Usage

1

Arguments

x

An input matrix with several columns

j

The column number with reference to which one wants to sort

Value

A sorted matrix

Examples

1
2
3
set.seed(30)
x=matrix(sample(1:50),ncol=5)
y=sort_matrix(x,3);y

generalCorr documentation built on July 22, 2017, 5:01 p.m.