data("Adult")
rules <- apriori(Adult)
## display some rules
inspect(rules[1000:1001])
inspect(rules[1000:1001], ruleSep = "~~>", itemSep = " + ", setStart = "", setEnd = "",
linebreak = FALSE)
## to get rules in readable format, use coercion or DATAFRAME with additional parameters.
as(rules[1000:1001], "data.frame")
DATAFRAME(rules[1000:1001])
DATAFRAME(rules[1000:1001], separate = TRUE, setStart = "", setEnd = "")
Run the code above in your browser using DataLab