wl5_diagram: Generate Win Loss Diagram

Description Usage Arguments Value Examples

View source: R/wl5_diagram.R

Description

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

Usage

1
wl5_diagram(data, topline, colour = TRUE)

Arguments

data

Data frame with columns ‘endpoint', ' ’wins', 'ties', 'losses''. The dataframe should have exactly 5 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
data <- data.frame(endpoint = c(paste0("endpoint", 1:5)),
wins = c(5,5,5,5,5),
ties = c(50,40,30,20,10),
losses = c(5,5,5,5,5))
wl5_diagram(data, topline="N=10*6 = 60")

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