Learn R Programming

validate (version 0.1.5)

barplot,validation-method: Plot number of violations

Description

Plot number of violations

Usage

"barplot"(height, ..., order_by = c("fails", "passes", "nNA"), stack_by = c("fails", "passes", "nNA"), topn = Inf, add_legend = TRUE, add_exprs = TRUE, colors = c(fails = "#FC8D59", passes = "#91CF60", nNA = "#FFFFBF"))

Arguments

height
an R object defining height of bars (here, a validation object)
...
parameters to be passed to barplot but not height, horiz, border,las, and las.
order_by
(single character) order bars decreasingly from top to bottom by the number of fails, passes or NA's.
stack_by
(3-vector of characters) Stacking order for bar chart (left to right)
topn
If specified, plot only the top n most violated calls
add_legend
Display legend?
add_exprs
Display rules?
colors
Bar colors for validations yielding NA or a violation

Value

A list, containing the bar locations as in barplot

Credits

The default colors were generated with the RColorBrewer package of Erich Neuwirth.

See Also

Examples

Run this code
data(retailers)
cf <- check_that(retailers
    , staff.costs < total.costs
    , turnover + other.rev == total.rev
    , other.rev > 0
    , total.rev > 0)
barplot(cf)

Run the code above in your browser using DataLab