I am trying to subset such that all items on the rhs and lhs are set to 1 but this is not working. Is there some other way I can make sure my items on the LHS and RHS of rules are all '1' only? I have used the following code.
rules = apriori(cosdat1, parameter=list(support=0.28, confidence=0.3, minlen=2, target="rules"))
summary(rules)
rules.sub <- subset(rules, subset = lhs %in% c("Bag=1","Blush=1","Nail.Polish=1","Brushes=1","Concealer=1","Eyebrow.Pencils=1","Bronzer=1","Lip.liner=1","Mascara=1","Eye.shadow=1","Foundation=1","Lip.Gloss=1","Lipstick=1","Eyeliner=1"));
rules.sub
rules.sub1 <- subset(rules, subset = rhs %in% c("Bag=1","Blush=1","Nail.Polish=1","Brushes=1","Concealer=1","Eyebrow.Pencils=1","Bronzer=1","Lip.liner=1","Mascara=1","Eye.shadow=1","Foundation=1","Lip.Gloss=1","Lipstick=1","Eyeliner=1"));
rules.sub1