inspect | R Documentation |
Provides the generic function inspect()
and methods to display
associations and transactions plus additional information formatted for
online inspection.
inspect(x, ...)
## S4 method for signature 'itemsets'
inspect(x, itemSep = ", ", setStart = "{", setEnd = "}", linebreak = NULL, ...)
## S4 method for signature 'rules'
inspect(
x,
itemSep = ", ",
setStart = "{",
setEnd = "}",
ruleSep = "=>",
linebreak = NULL,
...
)
## S4 method for signature 'transactions'
inspect(x, itemSep = ", ", setStart = "{", setEnd = "}", linebreak = NULL, ...)
## S4 method for signature 'itemMatrix'
inspect(x, itemSep = ", ", setStart = "{", setEnd = "}", linebreak = NULL, ...)
## S4 method for signature 'tidLists'
inspect(x, ...)
x |
a set of associations or transactions or an itemMatrix. |
... |
additional arguments. can be used to customize the output: |
itemSep |
item separator |
setStart |
set start symbol |
setEnd |
set end symbol |
linebreak |
print only one element per line in case the output lines get very long? |
ruleSep |
rule separator |
inspect()
prints the results directly. If you need to create a data.frame
with a human readable version, then you can use DATAFRAME()
.
Nothing is returned (see the Details Section).
Michael Hahsler and Kurt Hornik
Other associations functions:
abbreviate()
,
associations-class
,
c()
,
duplicated()
,
extract
,
is.closed()
,
is.generator()
,
is.maximal()
,
is.redundant()
,
is.significant()
,
is.superset()
,
itemsets-class
,
match()
,
rules-class
,
sample()
,
sets
,
size()
,
sort()
,
unique()
Other itemMatrix and transactions functions:
abbreviate()
,
c()
,
crossTable()
,
duplicated()
,
extract
,
hierarchy
,
image()
,
is.superset()
,
itemFrequency()
,
itemFrequencyPlot()
,
itemMatrix-class
,
match()
,
merge()
,
random.transactions()
,
sample()
,
sets
,
size()
,
supportingTransactions()
,
tidLists-class
,
transactions-class
,
unique()
data("Adult")
rules <- apriori(Adult)
## display some rules
inspect(rules[1000:1001])
inspect(rules[1000:1001], ruleSep = "~~>", itemSep = " + ", setStart = "", setEnd = "",
linebreak = FALSE)
## to get rules in readable format, use coercion or DATAFRAME with additional parameters.
as(rules[1000:1001], "data.frame")
DATAFRAME(rules[1000:1001])
DATAFRAME(rules[1000:1001], separate = TRUE, setStart = "", setEnd = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.