kpi_cut | R Documentation |
Cut KPI indicators
kpi_cut(
kpitab,
breakpoints,
risklabels = risklabs(breakpoints),
riskcolors = riskcols(breakpoints),
direction = c("increasing", "decreasing"),
raw_cut = FALSE
)
kpitab |
output from calc_kpi |
breakpoints |
cut points (if KPIs use a traffic light system) |
risklabels |
labels for the cut points. By default, variations on low/moderate/high are used |
riskcolors |
colors for the cut points. By default, variations on green/yellow/red are used |
direction |
seriousness relative to |
raw_cut |
add a group variable without applying |
kpitab <- mtcars %>%
kpitools:::kpi_calc("mpg", by = "am",
kpi_fn = kpi_fn_median, txt = "MPG")
cutpoints <- c(0, 20, 30)
kpitools:::kpi_cut(kpitab, cutpoints, risklabels = c("Low", "High"))
kpitools:::kpi_cut(kpitab, cutpoints, risklabels = 1:2)
kpitools:::kpi_cut(kpitab, cutpoints)
kpitools:::kpi_cut(kpitab, cutpoints, riskcolors = c("pink","blue"), direction="decreasing")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.