data("Adult")
## Mine rules with APRIORI
rules <- apriori(Adult, parameter = list(supp = 0.6))
## Print the 5 rules sorted by confidence and then support as a data.frame.
as(head(sort(rules, by = c("confidence", "support")), n=5), "data.frame")
## Order of rules by decreasing support
sort(rules, by = "confidence", order = TRUE)
Run the code above in your browser using DataLab