# NOT RUN {
data(Groceries)
rules <- apriori(Groceries, parameter=list(support=0.005, confidence=0.5))
rules
inspectDT(rules)
# for more control on the data table, you can used DATAFRAME() to convert the rules.
rules_df <- DATAFRAME(rules, setStart = '', setEnd = '', itemSep = ' + ')
rules_df$count <- NULL
head(rules_df)
inspectDT(rules_df)
# save a datatable as a html page.
p <- inspectDT(rules)
htmlwidgets::saveWidget(p, "arules.html", selfcontained = FALSE)
browseURL("arules.html")
# }
Run the code above in your browser using DataLab