org_matrix: Organize rows and columns of a matrix

Description Usage Arguments Value Examples

View source: R/org_matrix.R

Description

Organize rows and columns of a matrix

Usage

1
org_matrix(m, method = "alpha")

Arguments

m

A matrix with individuals ordered identically in rows and columns.

method

The method to be used to reorganize the matrix. method="alpha" is the default and will organize rows/columns based on alphanumeric order of rownames/colnames. method="wins" will return a matrix ordered in descending order of summed rows (i.e. total competitive interactions won). If rows have tied number of total wins, they will be returned in the order of the inputted matrix. method="ds" Will return a matrix ordered by David's Score.

Value

The same matrix m with reordered rows/columns

Examples

1
2
3
org_matrix(bonobos)
org_matrix(mouse, method="wins")
org_matrix(people, method="ds")

jalapic/compete documentation built on Feb. 23, 2020, 5:33 p.m.