readJudgePresenterMatrix: Transform a Judge-Presenter Matrix Converter

Description Usage Arguments Value Author(s) Examples

View source: R/Rfun_readJudgePresenterMatrix.R

Description

Convert a judge-presenter matrix to a set of square matrices

Usage

1

Arguments

jpMat

a Judge-Presenter matrix, or a User-Movie matrix

Value

A list, including numGame

  1. numGame: Number of times teams i and j faced eath other

  2. numWin: Number of wins teams i plays against j

  3. numTie: Number of ties teams i plays against j

  4. numLoss: Number of losses teams i plays against j

  5. numPt: Number of points teams i accumulates against j

Author(s)

Jiangtao Gou

Shuyi Wu

Examples

1
2
3
4
jpMat <- matrix(data=c(5,4,3,0, 5,5,3,1, 0,0,0,5, 0,0,2,0, 4,0,0,3, 1,0,0,4),
nrow=6,byrow=TRUE)
result <- readJudgePresenterMatrix(jpMat)
print(result)

Example output

$numGame
     [,1] [,2] [,3] [,4]
[1,]    0    2    2    3
[2,]    2    0    2    1
[3,]    2    2    0    1
[4,]    3    1    1    0

$numWin
     [,1] [,2] [,3] [,4]
[1,]    0    1    2    2
[2,]    0    0    2    1
[3,]    0    0    0    1
[4,]    1    0    0    0

$numTie
     [,1] [,2] [,3] [,4]
[1,]    0    1    0    0
[2,]    1    0    0    0
[3,]    0    0    0    0
[4,]    0    0    0    0

$numLoss
     [,1] [,2] [,3] [,4]
[1,]    0    0    0    1
[2,]    1    0    0    0
[3,]    2    2    0    0
[4,]    2    1    1    0

$numPt
     [,1] [,2] [,3] [,4]
[1,]    0   10   10   10
[2,]    9    0    9    5
[3,]    6    6    0    3
[4,]    8    1    1    0

raincin documentation built on July 1, 2020, 5:53 p.m.