Learn R Programming

arules (version 0.1-3)

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

Description

The rules class represents a set of rules.

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

apriori, associations-class, itemMatrix-class,

Examples

Run this code
data("Adult_transactions")

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

## Select a subset using an item in the right-hand-side
## and a quality measure/
rules.sub <- subset(rules, subset = rhs %in% "sex" & lift > 1.3)

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

Run the code above in your browser using DataLab