Provides the generic function inspect and S4 methods to display associations and transactions plus additional information formatted for online inspection.

inspect(x, ...)

Arguments

x
a set of associations or transactions or an itemMatrix.
additional arguments can be used to customize the output: setStart, setEnd, itemSep and ruleSep. Items are printed only one per line in case the output lines get very long. This can also be directly controlled using linebreak.

See also

itemMatrix-class, itemsets-class, rules-class, transactions-class

Examples

data("Adult") rules <- apriori(Adult)
#> Apriori #> #> Parameter specification: #> confidence minval smax arem aval originalSupport maxtime support minlen #> 0.8 0.1 1 none FALSE TRUE 5 0.1 1 #> maxlen target ext #> 10 rules FALSE #> #> Algorithmic control: #> filter tree heap memopt load sort verbose #> 0.1 TRUE TRUE FALSE TRUE 2 TRUE #> #> Absolute minimum support count: 4884 #> #> set item appearances ...[0 item(s)] done [0.00s]. #> set transactions ...[115 item(s), 48842 transaction(s)] done [0.03s]. #> sorting and recoding items ... [31 item(s)] done [0.01s]. #> creating transaction tree ... done [0.03s]. #> checking subsets of size 1 2 3 4 5 6 7 8 9 done [0.11s]. #> writing ... [6137 rule(s)] done [0.00s]. #> creating S4 object ... done [0.01s].
inspect(rules[1000])
#> lhs rhs support confidence lift #> [1] {education=Some-college, #> sex=Male, #> capital-loss=None} => {native-country=United-States} 0.1208181 0.9256471 1.031449
inspect(rules[1000], ruleSep = "---->", itemSep = " + ", setStart = "", setEnd ="", linebreak = FALSE)
#> lhs #> [1] education=Some-college + sex=Male + capital-loss=None ----> #> rhs support confidence lift #> [1] native-country=United-States 0.1208181 0.9256471 1.031449