itemFrequency(Groceries)
##               frankfurter                   sausage 
##              0.0589730554              0.0939501779 
##                liver loaf                       ham 
##              0.0050838841              0.0260294865 
##                      meat         finished products 
##              0.0258261312              0.0065073716 
##           organic sausage                   chicken 
##              0.0022369090              0.0429079817 
##                    turkey                      pork 
##              0.0081342145              0.0576512456 
##                      beef            hamburger meat 
##              0.0524656838              0.0332486019 
##                      fish              citrus fruit 
##              0.0029486528              0.0827656329 
##            tropical fruit                 pip fruit 
##              0.1049313676              0.0756481952 
##                    grapes                   berries 
##              0.0223690900              0.0332486019 
##               nuts/prunes           root vegetables 
##              0.0033553635              0.1089984748 
##                    onions                     herbs 
##              0.0310116929              0.0162684291 
##          other vegetables packaged fruit/vegetables 
##              0.1934926284              0.0130147433 
##                whole milk                    butter 
##              0.2555160142              0.0554143366 
##                      curd                   dessert 
##              0.0532791052              0.0371123538 
##               butter milk                    yogurt 
##              0.0279613625              0.1395017794 
##        whipped/sour cream                 beverages 
##              0.0716827656              0.0260294865 
##                  UHT-milk            condensed milk 
##              0.0334519573              0.0102694459 
##                     cream               soft cheese 
##              0.0013218099              0.0170818505 
##             sliced cheese               hard cheese 
##              0.0245043213              0.0245043213 
##             cream cheese           processed cheese 
##              0.0396542959              0.0165734621 
##             spread cheese               curd cheese 
##              0.0111845450              0.0050838841 
##          specialty cheese                mayonnaise 
##              0.0085409253              0.0091509914 
##            salad dressing                   tidbits 
##              0.0008134215              0.0023385867 
##         frozen vegetables             frozen fruits 
##              0.0480935435              0.0012201322 
##              frozen meals               frozen fish 
##              0.0283680732              0.0116929334 
##            frozen chicken                 ice cream 
##              0.0006100661              0.0250127097 
##            frozen dessert    frozen potato products 
##              0.0107778343              0.0084392476 
##             domestic eggs                rolls/buns 
##              0.0634468734              0.1839349263 
##               white bread               brown bread 
##              0.0420945602              0.0648703610 
##                    pastry            roll products  
##              0.0889679715              0.0102694459 
##       semi-finished bread                  zwieback 
##              0.0176919166              0.0069140824 
##           potato products                     flour 
##              0.0028469751              0.0173868836 
##                      salt                      rice 
##              0.0107778343              0.0076258261 
##                     pasta                   vinegar 
##              0.0150482969              0.0065073716 
##                       oil                 margarine 
##              0.0280630402              0.0585663447 
##             specialty fat                     sugar 
##              0.0036603965              0.0338586680 
##          artif. sweetener                     honey 
##              0.0032536858              0.0015251652 
##                   mustard                   ketchup 
##              0.0119979664              0.0042704626 
##                    spices                     soups 
##              0.0051855618              0.0068124047 
##               ready soups     Instant food products 
##              0.0018301983              0.0080325369 
##                    sauces                   cereals 
##              0.0054905948              0.0056939502 
##          organic products             baking powder 
##              0.0016268429              0.0176919166 
##     preservation products            pudding powder 
##              0.0002033554              0.0023385867 
##         canned vegetables              canned fruit 
##              0.0107778343              0.0032536858 
##        pickled vegetables      specialty vegetables 
##              0.0178952720              0.0017285206 
##                       jam             sweet spreads 
##              0.0053889171              0.0090493137 
##              meat spreads               canned fish 
##              0.0042704626              0.0150482969 
##                  dog food                  cat food 
##              0.0085409253              0.0232841891 
##                  pet care                 baby food 
##              0.0094560244              0.0001016777 
##                    coffee            instant coffee 
##              0.0580579563              0.0074224708 
##                       tea              cocoa drinks 
##              0.0038637519              0.0022369090 
##             bottled water                      soda 
##              0.1105236401              0.1743772242 
##           misc. beverages     fruit/vegetable juice 
##              0.0283680732              0.0722928317 
##                     syrup              bottled beer 
##              0.0032536858              0.0805287239 
##               canned beer                    brandy 
##              0.0776817489              0.0041687850 
##                    whisky                    liquor 
##              0.0008134215              0.0110828673 
##                       rum                   liqueur 
##              0.0044738180              0.0009150991 
##        liquor (appetizer)                white wine 
##              0.0079308592              0.0190137265 
##            red/blush wine                  prosecco 
##              0.0192170819              0.0020335536 
##            sparkling wine               salty snack 
##              0.0055922725              0.0378240976 
##                   popcorn                 nut snack 
##              0.0072191154              0.0031520081 
##            snack products  long life bakery product 
##              0.0030503305              0.0374173869 
##                   waffles                  cake bar 
##              0.0384341637              0.0132180986 
##               chewing gum                 chocolate 
##              0.0210472801              0.0496187087 
##         cooking chocolate       specialty chocolate 
##              0.0025419420              0.0304016268 
##             specialty bar     chocolate marshmallow 
##              0.0273512964              0.0090493137 
##                     candy         seasonal products 
##              0.0298932384              0.0142348754 
##                 detergent                  softener 
##              0.0192170819              0.0054905948 
##               decalcifier              dish cleaner 
##              0.0015251652              0.0104728012 
##          abrasive cleaner                   cleaner 
##              0.0035587189              0.0050838841 
##            toilet cleaner          bathroom cleaner 
##              0.0007117438              0.0027452974 
##                hair spray               dental care 
##              0.0011184545              0.0057956279 
##            male cosmetics           make up remover 
##              0.0045754957              0.0008134215 
##                 skin care  female sanitary products 
##              0.0035587189              0.0061006609 
##            baby cosmetics                      soap 
##              0.0006100661              0.0026436197 
##           rubbing alcohol          hygiene articles 
##              0.0010167768              0.0329435689 
##                   napkins                    dishes 
##              0.0523640061              0.0175902389 
##                  cookware           kitchen utensil 
##              0.0027452974              0.0004067107 
##           cling film/bags            kitchen towels 
##              0.0113879004              0.0059989832 
##    house keeping products                   candles 
##              0.0083375699              0.0089476360 
##               light bulbs      sound storage medium 
##              0.0041687850              0.0001016777 
##                newspapers                photo/film 
##              0.0798169802              0.0092526690 
##                pot plants    flower soil/fertilizer 
##              0.0172852059              0.0019318760 
##            flower (seeds)             shopping bags 
##              0.0103711235              0.0985256736 
##                      bags 
##              0.0004067107
##itemFrequencyPlot(Groceries,cex.name=0.5)

gro <- apriori(Groceries,parameter=list(support=.01,confidence=.4)) 
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.4    0.1    1 none FALSE            TRUE       5    0.01      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: 98 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[169 item(s), 9835 transaction(s)] done [0.00s].
## sorting and recoding items ... [88 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 4 done [0.00s].
## writing ... [62 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
inspect(sort(gro, by = "confidence"))
##      lhs                        rhs                   support confidence     lift count
## [1]  {citrus fruit,                                                                    
##       root vegetables}       => {other vegetables} 0.01037112  0.5862069 3.029608   102
## [2]  {tropical fruit,                                                                  
##       root vegetables}       => {other vegetables} 0.01230300  0.5845411 3.020999   121
## [3]  {curd,                                                                            
##       yogurt}                => {whole milk}       0.01006609  0.5823529 2.279125    99
## [4]  {other vegetables,                                                                
##       butter}                => {whole milk}       0.01148958  0.5736041 2.244885   113
## [5]  {tropical fruit,                                                                  
##       root vegetables}       => {whole milk}       0.01199797  0.5700483 2.230969   118
## [6]  {root vegetables,                                                                 
##       yogurt}                => {whole milk}       0.01453991  0.5629921 2.203354   143
## [7]  {other vegetables,                                                                
##       domestic eggs}         => {whole milk}       0.01230300  0.5525114 2.162336   121
## [8]  {yogurt,                                                                          
##       whipped/sour cream}    => {whole milk}       0.01087951  0.5245098 2.052747   107
## [9]  {root vegetables,                                                                 
##       rolls/buns}            => {whole milk}       0.01270971  0.5230126 2.046888   125
## [10] {pip fruit,                                                                       
##       other vegetables}      => {whole milk}       0.01352313  0.5175097 2.025351   133
## [11] {tropical fruit,                                                                  
##       yogurt}                => {whole milk}       0.01514997  0.5173611 2.024770   149
## [12] {other vegetables,                                                                
##       yogurt}                => {whole milk}       0.02226741  0.5128806 2.007235   219
## [13] {other vegetables,                                                                
##       whipped/sour cream}    => {whole milk}       0.01464159  0.5070423 1.984385   144
## [14] {root vegetables,                                                                 
##       rolls/buns}            => {other vegetables} 0.01220132  0.5020921 2.594890   120
## [15] {root vegetables,                                                                 
##       yogurt}                => {other vegetables} 0.01291307  0.5000000 2.584078   127
## [16] {other vegetables,                                                                
##       fruit/vegetable juice} => {whole milk}       0.01047280  0.4975845 1.947371   103
## [17] {butter}                => {whole milk}       0.02755465  0.4972477 1.946053   271
## [18] {curd}                  => {whole milk}       0.02613116  0.4904580 1.919481   257
## [19] {yogurt,                                                                          
##       whipped/sour cream}    => {other vegetables} 0.01016777  0.4901961 2.533410   100
## [20] {root vegetables,                                                                 
##       other vegetables}      => {whole milk}       0.02318251  0.4892704 1.914833   228
## [21] {tropical fruit,                                                                  
##       other vegetables}      => {whole milk}       0.01708185  0.4759207 1.862587   168
## [22] {citrus fruit,                                                                    
##       yogurt}                => {whole milk}       0.01026945  0.4741784 1.855768   101
## [23] {root vegetables,                                                                 
##       whole milk}            => {other vegetables} 0.02318251  0.4740125 2.449770   228
## [24] {domestic eggs}         => {whole milk}       0.02999492  0.4727564 1.850203   295
## [25] {pork,                                                                            
##       other vegetables}      => {whole milk}       0.01016777  0.4694836 1.837394   100
## [26] {other vegetables,                                                                
##       pastry}                => {whole milk}       0.01057448  0.4684685 1.833421   104
## [27] {onions}                => {other vegetables} 0.01423488  0.4590164 2.372268   140
## [28] {pork,                                                                            
##       whole milk}            => {other vegetables} 0.01016777  0.4587156 2.370714   100
## [29] {whole milk,                                                                      
##       whipped/sour cream}    => {other vegetables} 0.01464159  0.4542587 2.347679   144
## [30] {yogurt,                                                                          
##       rolls/buns}            => {whole milk}       0.01555669  0.4526627 1.771563   153
## [31] {citrus fruit,                                                                    
##       other vegetables}      => {whole milk}       0.01301474  0.4507042 1.763898   128
## [32] {whipped/sour cream}    => {whole milk}       0.03223183  0.4496454 1.759754   317
## [33] {pip fruit,                                                                       
##       whole milk}            => {other vegetables} 0.01352313  0.4493243 2.322178   133
## [34] {root vegetables}       => {whole milk}       0.04890696  0.4486940 1.756031   481
## [35] {tropical fruit,                                                                  
##       rolls/buns}            => {whole milk}       0.01098119  0.4462810 1.746587   108
## [36] {sugar}                 => {whole milk}       0.01504830  0.4444444 1.739400   148
## [37] {hamburger meat}        => {whole milk}       0.01474326  0.4434251 1.735410   145
## [38] {ham}                   => {whole milk}       0.01148958  0.4414062 1.727509   113
## [39] {sliced cheese}         => {whole milk}       0.01077783  0.4398340 1.721356   106
## [40] {root vegetables}       => {other vegetables} 0.04738180  0.4347015 2.246605   466
## [41] {other vegetables,                                                                
##       bottled water}         => {whole milk}       0.01077783  0.4344262 1.700192   106
## [42] {citrus fruit,                                                                    
##       whole milk}            => {other vegetables} 0.01301474  0.4266667 2.205080   128
## [43] {other vegetables,                                                                
##       soda}                  => {whole milk}       0.01392984  0.4254658 1.665124   137
## [44] {frozen vegetables}     => {whole milk}       0.02043721  0.4249471 1.663094   201
## [45] {tropical fruit,                                                                  
##       yogurt}                => {other vegetables} 0.01230300  0.4201389 2.171343   121
## [46] {other vegetables,                                                                
##       rolls/buns}            => {whole milk}       0.01789527  0.4200477 1.643919   176
## [47] {chicken}               => {other vegetables} 0.01789527  0.4170616 2.155439   176
## [48] {whole milk,                                                                      
##       butter}                => {other vegetables} 0.01148958  0.4169742 2.154987   113
## [49] {hamburger meat}        => {other vegetables} 0.01382816  0.4159021 2.149447   136
## [50] {cream cheese }         => {whole milk}       0.01647178  0.4153846 1.625670   162
## [51] {butter milk}           => {whole milk}       0.01159126  0.4145455 1.622385   114
## [52] {margarine}             => {whole milk}       0.02419929  0.4131944 1.617098   238
## [53] {hard cheese}           => {whole milk}       0.01006609  0.4107884 1.607682    99
## [54] {whole milk,                                                                      
##       domestic eggs}         => {other vegetables} 0.01230300  0.4101695 2.119820   121
## [55] {chicken}               => {whole milk}       0.01759024  0.4099526 1.604411   173
## [56] {white bread}           => {whole milk}       0.01708185  0.4057971 1.588147   168
## [57] {beef}                  => {whole milk}       0.02125064  0.4050388 1.585180   209
## [58] {tropical fruit,                                                                  
##       whole milk}            => {other vegetables} 0.01708185  0.4038462 2.087140   168
## [59] {tropical fruit}        => {whole milk}       0.04229792  0.4031008 1.577595   416
## [60] {whipped/sour cream}    => {other vegetables} 0.02887646  0.4028369 2.081924   284
## [61] {oil}                   => {whole milk}       0.01128622  0.4021739 1.573968   111
## [62] {yogurt}                => {whole milk}       0.05602440  0.4016035 1.571735   551
##sorted by confidence

inspect(sort(subset(gro, subset=confidence > 5), by="confidence")) 
## Sorted by confidence in accending order

inspect(sort(subset(gro, subset=confidence > 5), by="lift"))

According to the inspections, citrus fruit and root vegetables, and tropical fruit and root vegetables had highest confidence and lift. So those products are tend to bought in together.