Hello,

I am using the package arules to generate association rules.  I would like
to restrict the rules so that in the left-hand side there's only one
particular element, let's call it "potatoe".

If I do this:
rules <- apriori(dtm.mat, parameter = list(sup = 0.4, conf =
0.9,target="rules"), appearance = list(lhs = c("potatoe")))

I get "potatoe" on the lhs, but also all other kinds of things. How can I
force that the rules contain only one element? The parameter maxlen don't do
what I want, because, as far as I can see, I cannot specify the maxlen to
apply to the elements on the left.

Thanks!

Laia

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to