Perform the following steps to display transactions and associations:
- First, you can obtain a LIST representation of the transaction data:
> LIST(trans) Output $Tr1 [1] "Apple" "Bread" "Cake" $Tr2 [1] "Apple" "Bread" "Milk" $Tr3 [1] "Bread" "Cake" "Milk"
- Next, you can use the summary function to show a summary of the statistics and details of the transactions:
> summary(trans) Output transactions as itemMatrix in sparse format with 3 rows (elements/itemsets/transactions) and 4 columns (items) and a density of 0.75 most frequent items: Bread Apple Cake Milk (Other) 3 2 2 2 0 element (itemset/transaction) length distribution: sizes 3 3 Min. 1st Qu. Median Mean 3rd Qu. Max. 3 3 3 3 3 3 includes extended item information ...