mat2seq: matrix to sequence conversion

Description Usage Arguments Value Examples

View source: R/mat2seq.R

Description

matrix to sequence conversion

Usage

1
mat2seq(mat)

Arguments

mat

square interaction matrix with winner in rows and losers in columns (can have column/row names or not)

Value

a data.frame with a winner and a loser column

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mat <- matrix(c(0,1,1,0,0,1,0,0,0), ncol=3, byrow = TRUE)
rownames(mat) <- colnames(mat) <- LETTERS[1:3]
mat2seq(mat)

mat <- matrix(c(0,1,1,0,0,1,3,0,0), ncol=3, byrow = TRUE)
rownames(mat) <- colnames(mat) <- LETTERS[1:3]
mat2seq(mat)

# without column names
mat <- matrix(c(0,1,1,0,0,1,0,0,0), ncol=3, byrow = TRUE)
mat2seq(mat)

EloRating documentation built on March 26, 2020, 7:29 p.m.