Displaying transactions and associations
arule package uses its own
transactions class to store transaction data. As such, we must use the generic function provided by
arule to display transactions and association rules. In this recipe, we will illustrate how to display transactions and association rules via various functions in the
Ensure that you have completed the previous recipe by generating transactions and storing these in the variable,
How to do it...
Perform the following steps to display transactions and associations:
- First, you can obtain a LIST representation of the transaction data:
> LIST(trans) $Tr1  "Apple" "Bread" "Cake" $Tr2  "Apple" "Bread" "Milk" $Tr3  "Bread" "Cake" "Milk"
- Next, ...