wl8_diagram: Generate Win Loss Diagram

Description Usage Arguments Value Examples

View source: R/wl8_diagram.R

Description

Uses the DiagrammeR package to return a win-loss diagram. Currently only supports exactly 8 rows.

Usage

1
wl8_diagram(data, topline, colour = TRUE)

Arguments

data

Data frame with columns ‘endpoint', ' ’wins', 'ties', 'losses''. The dataframe should have exactly 8 rows.

topline

Character string to be included in the top box.

colour

Logical default = TRUE. If TRUE the diagram will be coloured.

Value

grViz object. Refer to DiagrammeR package for details.

Examples

1
2
3
4
5
6
data <- data.frame(endpoint = c(paste0("endpoint", 1:8)),
wins = c(5,5,5,5,5,5,5,5),
ties = c(80,70,60,50,40,30,20,10),
losses = c(5,5,5,5,5,5,5,5))
wl8_diagram(data, topline="N=10*9 = 90")
wl8_diagram(data, topline="N=10*9 = 90", colour = FALSE)

kismet303/iDiagrams documentation built on April 10, 2020, 11:26 a.m.