I'm trying to perform Market Basket Analysis and after executing the inspect command I get the following error:
Error in slot(x, s)[i] : subscript out of bounds.
This is my code:
basket_rules <- apriori(txn, parameter = list(sup = 0.005, conf = 0.01, target="rules"))
basket.sorted <- sort(basket_rules, by = "lift")
itemFrequencyPlot(txn, topN = 25)