For this analysis, we will only need to load two packages, as well as the Groceries
dataset:
> library(arules) > library(arulesViz) > data(Groceries) > head(Groceries) transactions in sparse format with 9835 transactions (rows) and 169 items (columns) > str(Groceries) Formal class 'transactions' [package "arules"] with 3 slots ..@ data :Formal class 'ngCMatrix' [package "Matrix"] with 5 slots .. .. ..@ i : int [1:43367] 13 60 69 78 14 29 98 24 15 29 ... .. .. ..@ p : int [1:9836] 0 4 7 8 12 16 21 22 27 28 ... .. .. ..@ Dim : int [1:2] 169 9835 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : NULL .. .. .. ..$ : NULL .. .. ..@ factors : list() ..@ itemInfo :'data.frame': 169 obs. of 3 variables: .. ..$ labels: chr [1:169] "frankfurter" "sausage" "liver loaf" "ham" ... .. ..$ level2: Factor w/ 55 levels "baby food","bags",..: 44 44 44 44 44 44...