plot,validation-method | R Documentation |
Creates a barplot of validation result. For each validation rule, a stacked bar is plotted with percentages of failing, passing, and missing results.
## S4 method for signature 'validation'
plot(
x,
y,
fill = c("#FE2712", "#66B032", "#dddddd"),
col = fill,
rulenames = names(x),
labels = c("Fails", "Passing", "Missing", "Total"),
title = NULL,
xlab = NULL,
...
)
x |
a confrontation object. |
y |
not used |
fill |
|
col |
Edge colors for the bars. |
rulenames |
|
labels |
|
title |
|
xlab |
|
... |
not used |
The plot function tries to be smart about placing labels on the y axis. When the number of bars becomes too large, no y axis annotation will be shown and the bars will become space-filling.
Other validation-methods:
aggregate,validation-method
,
all,validation-method
,
any,validation-method
,
barplot,validation-method
,
check_that()
,
compare()
,
confront()
,
event()
,
names<-,rule,character-method
,
sort,validation-method
,
summary()
,
validation-class
,
values()
rules <- validator( r1 = staff.costs < total.costs
, r2 = turnover + other.rev == total.rev
, r3 = other.rev > 0
, r4 = total.rev > 0
, r5 = nace %in% c("A", "B")
)
plot(rules, cex=0.8, show_legend=TRUE)
data(retailers)
cf <- confront(retailers, rules)
plot(cf, main="Retailers check")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.