Hi all,
There is no item with the label "".
> itemLabels(rules)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
arules::subset(rules, subset=lhs %pin% "") should return an empty set or
throw an error---I will fix that in the next release of arules.
To get the rules with 0 elements in t
Hello Luisfo,
thank you for the hint: Your suggestion
arules::subset(rules, subset=lhs %pin% "")
gave 18 rules (out of 21) in my example, and not 3, what I have expected.
Surprisingly the negation of the subset condition
arules::subset(x = rules, subset = !(lhs %pin% ""))
returns the 3
Dear Tom,
I think this is the line you need
arules::subset(rules, subset=lhs %pin% "")
I found the solution here:
http://stackoverflow.com/questions/27926131/how-to-get-items-for-both-lhs-and-rhs-for-only-specific-columns-in-arules
One more thing. For printing the rules, I needed the inspect(
Hello,
subsets of association rules (with respect to support, confidence, lift, or
items) can be obtained with the arules::subset() function; e.g.
rm(list = ls(all.names = TRUE))
library(arules)
set.seed(42)
x <- lapply(X = 1:500, FUN = function(i)
sample(x = 1:10, size = sample(1:5,
4 matches
Mail list logo