Database Reference
In-Depth Information
category in level2 , and it is part of the meat and sausage category in level1 .
(Note that “ meet ” in level1 is a typo in the dataset.)
Groceries@itemInfo[1:20,]
labels level2 level1
1 frankfurter sausage meet and sausage
2 sausage sausage meet and sausage
3 liver loaf sausage meet and sausage
4 ham sausage meet and sausage
5 meat sausage meet and sausage
6 finished products sausage meet and sausage
7 organic sausage sausage meet and sausage
8 chicken poultry meet and sausage
9 turkey poultry meet and sausage
10 pork pork meet and sausage
11 beef beef meet and sausage
12 hamburger meat beef meet and sausage
13 fish fish meet and sausage
14 citrus fruit fruit fruit and vegetables
15 tropical fruit fruit fruit and vegetables
16 pip fruit fruit fruit and vegetables
17 grapes fruit fruit and vegetables
18 berries fruit fruit and vegetables
19 nuts/prunes fruit fruit and vegetables
20 root vegetables vegetables fruit and vegetables
The following code displays the 10th to 20th transactions of the Groceries
dataset. The [10:20] can be changed to [1:9835] to display all the transactions.
apply(Groceries@data[,10:20], 2,
function(r) paste(Groceries@itemInfo[r,"labels"],
collapse=", ")
)
Each row in the output shows a transaction that includes one or more products,
and each transaction corresponds to everything in a customer's shopping cart. For
example, in the first transaction, a customer has purchased whole milk and cereals.
Search WWH ::




Custom Search