coverage {arules} | R Documentation

## Calculate coverage for rules

### Description

Provides the generic function and the needed S4 method to calculate the coverage (support of the left-hand-side) of rules.

### Usage

    coverage(x)

### Arguments

`x` | the set of rules.

### Details

Coverage is calculated from the rules quality measures (support and confidence) stored in the quality slot.

### Value

A numeric vector of the same length as `x` containing the coverage values for the sets in `x`.

### See Also

`rules-class`

### Examples

    data("Income")

    ## find and some rules (we only use 5 rules here) and calculate coverage
    rules <- apriori(Income)[1:5]
    quality(rules) <- cbind(quality(rules), coverage = coverage(rules))

    inspect(rules)

[Package arules version 0.6-3 Index]