inspect {arules}R Documentation

Display Associations and Transactions in Readable Form

Description

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

Usage

inspect(x, ...)

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.

Value

Nothing is returned. This function is purely used for displaying object details. Use coercion with as to a list or a data.frame or the accessor functions provided for the object (see See Also section).

Author(s)

Michael Hahsler and Kurt Hornik

See Also

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

Examples

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 = "")

[Package arules version 1.7-1 Index]