Try:

> inspect(sort(crs$apriori, by="support"))

Graham Williams
http://togaware.com


On 27 June 2014 16:46, Abhinaba Roy <abhinabaro...@gmail.com> wrote:

> Dear R-helpers,
>
> I have run a basket analysis in Rattle. I've used 'arules' package.
>
> > crs$apriori <- apriori(crs$transactions, parameter = list(support=0.100,
> confidence=0.100, minlen=2))
>
> and
>
> > str(crs$apriori)
> Formal class 'rules' [package "arules"] with 4 slots
>   ..@ lhs    :Formal class 'itemMatrix' [package "arules"] with 3 slots
>   .. .. ..@ data       :Formal class 'ngCMatrix' [package "Matrix"] with 5
> slots
>   .. .. .. .. ..@ i       : int [1:22] 0 3 0 1 2 3 2 1 3 1 ...
>   .. .. .. .. ..@ p       : int [1:17] 0 1 2 3 4 5 6 7 8 9 ...
>   .. .. .. .. ..@ Dim     : int [1:2] 4 16
>   .. .. .. .. ..@ Dimnames:List of 2
>   .. .. .. .. .. ..$ : NULL
>   .. .. .. .. .. ..$ : NULL
>   .. .. .. .. ..@ factors : list()
>   .. .. ..@ itemInfo   :'data.frame':   4 obs. of  1 variable:
>   .. .. .. ..$ labels:Class 'AsIs'  chr [1:4] "1" "2" "3" "4"
>   .. .. ..@ itemsetInfo:'data.frame':   0 obs. of  0 variables
>   ..@ rhs    :Formal class 'itemMatrix' [package "arules"] with 3 slots
>   .. .. ..@ data       :Formal class 'ngCMatrix' [package "Matrix"] with 5
> slots
>   .. .. .. .. ..@ i       : int [1:16] 3 0 1 0 3 2 1 2 1 3 ...
>   .. .. .. .. ..@ p       : int [1:17] 0 1 2 3 4 5 6 7 8 9 ...
>   .. .. .. .. ..@ Dim     : int [1:2] 4 16
>   .. .. .. .. ..@ Dimnames:List of 2
>   .. .. .. .. .. ..$ : NULL
>   .. .. .. .. .. ..$ : NULL
>   .. .. .. .. ..@ factors : list()
>   .. .. ..@ itemInfo   :'data.frame':   4 obs. of  1 variable:
>   .. .. .. ..$ labels:Class 'AsIs'  chr [1:4] "1" "2" "3" "4"
>   .. .. ..@ itemsetInfo:'data.frame':   0 obs. of  0 variables
>   ..@ quality:'data.frame':     16 obs. of  3 variables:
>   .. ..$ support   : num [1:16] 0.16 0.16 0.169 0.169 0.321 ...
>   .. ..$ confidence: num [1:16] 0.619 0.244 0.654 0.242 0.661 ...
>   .. ..$ lift      : num [1:16] 0.943 0.943 0.935 0.935 1.007 ...
>   ..@ info   :List of 4
>   .. ..$ data         : language crs$transactions
>   .. ..$ ntransactions: int 894
>   .. ..$ support      : num 0.1
>   .. ..$ confidence   : num 0.1
>
> How can I extract the set of rules from crs$apriori?
> --
> Regards
> Abhinaba Roy
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
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