inspect: Display Associations and Transactions in Readable Form

Description Usage Arguments Author(s) See Also Examples

Description

Provides the generic function inspect and S4 methods to display associations and transactions plus additional information formatted for online inspection.

Usage

1

Arguments

x

a set of associations or transactions or an itemMatrix.

...

additional arguments can be used to customize the output: setStart, setEnd, itemSep and ruleSep. Items are printed only one per line in case the output lines get very long. This can also be directly controlled using linebreak.

Author(s)

Michael Hahsler and Kurt Hornik

See Also

itemMatrix-class, itemsets-class, rules-class, transactions-class

Examples

1
2
3
4
5
6
data("Adult")
rules <- apriori(Adult)
inspect(rules[1000])

inspect(rules[1000], ruleSep = "---->", itemSep = " + ", setStart = "", setEnd ="", 
  linebreak = FALSE)

Example output

Loading required package: Matrix

Attaching package: 'arules'

The following objects are masked from 'package:base':

    abbreviate, write

Apriori

Parameter specification:
 confidence minval smax arem  aval originalSupport maxtime support minlen
        0.8    0.1    1 none FALSE            TRUE       5     0.1      1
 maxlen target   ext
     10  rules FALSE

Algorithmic control:
 filter tree heap memopt load sort verbose
    0.1 TRUE TRUE  FALSE TRUE    2    TRUE

Absolute minimum support count: 4884 

set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[115 item(s), 48842 transaction(s)] done [0.03s].
sorting and recoding items ... [31 item(s)] done [0.01s].
creating transaction tree ... done [0.03s].
checking subsets of size 1 2 3 4 5 6 7 8 9 done [0.12s].
writing ... [6137 rule(s)] done [0.00s].
creating S4 object  ... done [0.01s].
    lhs                         rhs                              support confidence     lift
[1] {education=Some-college,                                                                
     sex=Male,                                                                              
     capital-loss=None}      => {native-country=United-States} 0.1208181  0.9256471 1.031449
    lhs                                                        
[1] education=Some-college + sex=Male + capital-loss=None ---->
    rhs                          support   confidence lift    
[1] native-country=United-States 0.1208181 0.9256471  1.031449

arules documentation built on Nov. 17, 2017, 6:02 a.m.