R: Plot validation results

plot,validation-method {validate} | R Documentation

## Plot validation results

### Description

Creates a barplot of validation result. For each validation rule, a stacked bar is plotted with percentages of failing, passing, and missing results.

### Usage

    ## 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,
      ...
    )

### Arguments

`x` | a confrontation object.
`y` | not used
`fill` | `[character]` vector of length 3. Colors representing fails, passes, and missings
`col` | Edge colors for the bars.
`rulenames` | `[character]` vector of size `length(x)`. If not specified, names are taken from `x`.
`labels` | `[character]` vector of length 4. Replace legend annotation.
`title` | `[character]` Change the default title.
`xlab` | `[character]` Change the title
`...` | not used

### Details

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.

### See Also

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()`

### Examples

    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")

[Package validate version 1.1.1 Index]