Usage
createSlopegraph(data, id, rankFrom, rankTo, reverse = TRUE, na.rm = FALSE, scaleFactor = 1, fromLabel = rankFrom, toLabel = rankTo, title = paste("Slopegraph by", rankTo), subtitle = NULL, baseSize = 12, baseFamily = "sans", classLabels = c(rankFrom, rankTo), classTextSize = 12, colour = "#999999", upColour = "#D55E00", downColour = "#009E73", highlights = integer(0), lineSize = 0.15, textSize = 3.75, panelGridColour = "black", panelGridSize = 0.1, defaultTheme = theme_tufte(base_size = baseSize, base_family = baseFamily), themeExtra = NULL)
Arguments
data
data frame contains data computed for slopegraph
id
name of column identifying each graph element having from (before) and to (after) pair of values
rankFrom
name of column with from (before) value
rankTo
name of column with to (after) value
reverse
logical reverse values if TRUE (smaller is better)
na.rm
logical value indicating whether NA values should be stripped before the visualization
proceeds.
scaleFactor
scale factor applied to all values (-1 can be used instead of reverse
TRUE).
fromLabel
label for left values (from or before).
toLabel
label for right values (to or after).
baseFamily
base font family.
classLabels
pair of labels for to and from columns (or classes).
classTextSize
size of text for class labels.
upColour
colour of up slope.
downColour
colour of down slope.
highlights
vector with indexes of highlighted points.
lineSize
size of slope lines.
panelGridColour
background panel grid colour.
panelGridSize
background panel grid size.
themeExtra
any additional theme
settings that override default theme.