Learn R Programming

arules (version 1.0-12)

rules-class: Class ``rules'' --- A Set of Rules

Description

The rules class represents a set of rules.

Note that the class can also represent a multiset of rules with duplicated elements. Duplicated elements can be removed with unique.

Arguments

Objects from the Class

Objects are the result of calling the function apriori. Objects can also be created by calls of the form new("rules", ...).

Extends

Class associations, directly.

See Also

[-methods, apriori, c, duplicated, inspect, length, match, sets, size, subset, associations-class, itemMatrix-class,

Examples

Run this code
data("Adult")

## Mine rules.
rules <- apriori(Adult, parameter = list(support = 0.4))

## Select a subset of rules using partial matching on the items 
## in the right-hand-side and a quality measure
rules.sub <- subset(rules, subset = rhs %pin% "sex" & lift > 1.3)

## Display rules.
inspect(sort(rules.sub)[1:3])

Run the code above in your browser using DataLab