I am doing some association rules mining in R and want to extract my results so I can build reports my results look like this:
> inspect(rules[1:3])
lhs rhs support confidence lift
1 {apples} => {oranges} 0.00029 0.24 4.4
2 {apples} => {pears} 0.00022 0.18 45.6
3 {apples} => {pineapples} 0.00014 0.12 1.8
How do i extract the "rhs" here i.e. a vector of oranges, pears and pineapples
Further how do I extract information out of the summary i.e.
> summary(rules)
The data type is "s4" and have no problem extracting when the output is in the list etc.. how do you do the equivelant? set of 3 rules
rule length distribution (lhs + rhs):sizes
2
3
Min. 1st Qu. Median Mean 3rd Qu. Max.
2 2 2 2 2 2
I want to extract the "3" from the "set of 3 rules"
I have gotten as far as using "@" What does the @ symbol mean in R?
But once i use that, how do i turn my results into a vector i.e.
inspect(rules@rhs)
1 {oranges}
2 {pears}
3 {pineapples}
becomes character vector of length 3