Learn R Programming

multiDimBio (version 1.2.2)

makeCompMat: A function to create a pairwise comparison matrix

Description

This function creates a pairwise comparison matrix for n groups. All possible pairwise combinations are created, with rows in the matrix equal to the desired comparison.

Usage

makeCompMat(ng)

Value

Returns a matrix with two columns and ng choose 2 rows.

Arguments

ng

A single number indicating the total number of unique groups

See Also

PermuteLDA

Examples

Run this code
makeCompMat(3)

makeCompMat(4)

data(Groups)
NGroups<-length(unique(Groups))

makeCompMat(NGroups)

Run the code above in your browser using DataLab