R: Plot a validator object

plot,validator-method {validate} | R Documentation

## Plot a validator object

### Description

The matrix of variables x rules is plotted, in which rules that are recognized as linear (in)equations are differently colored. The augmented matrix is returned, but can also be calculated using `variables(x, as="matrix")`.

### Usage

    ## S4 method for signature 'validator'
    plot(
      x,
      y,
      use_blocks = TRUE,
      col = c("#b2df8a", "#a6cee3"),
      cex = 1,
      show_legend = TRUE,
      ...
    )

### Arguments

`x` | validator object with rules
`y` | not used
`use_blocks` | `logical` if `TRUE` the matrix is sorted according to the connected sub sets of variables (aka blocks).
`col` | `character` with color codes for plotting variables.
`cex` | size of the variables plotted.
`show_legend` | should a legend explaining the colors be drawn?
`...` | passed to image

### Value

(invisible) the matrix

### See Also

`variables`

Other validator-methods: `+,validator,validator-method`, `validator`

Other expressionset-methods: `as.data.frame,expressionset-method`, `as.data.frame()`, `created()`, `description()`, `label()`, `meta()`, `names<-,rule,character-method`, `origin()`, `summary()`, `variables()`, `voptions()`

### 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 0.9.3 Index]