R arules - a subset of transactions matching a rule
I am using the R arules package . I have some transactions and a rule (see below). I want a subset of transactions to break the rule. How can i do this?
This is the setting:
library(arules) data(Adult) summary(Adult) rules = apriori(Adult,parameter=list(support=0.2,confidence=0.8)) summary(rules) r=rules[1]
I want a subset of transactions that contain the left side of the rule r
but not the right side. There is no such example in the arules documentation. I've tried %in%
, match
and subset
, but I can't get the syntax right.
The documentation for the function subset
has an example of subset rules, but no examples of transaction subsets.
+3
source to share