d <- partition(mtcars, .breaks = 2)
rules <- dig_associations(d,
antecedent = !starts_with("mpg"),
consequent = starts_with("mpg"),
min_support = 0.3,
min_confidence = 0.8)
r <- rules[1, ] # get first rule
anc <- dig_ancestors(r, d)
Run the code above in your browser using DataLab