Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inspect

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

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

arules

Mining Association Rules and Frequent Itemsets

v1.6-7
GPL-3
Authors
Michael Hahsler [aut, cre, cph], Christian Buchta [aut, cph], Bettina Gruen [aut, cph], Kurt Hornik [aut, cph], Ian Johnson [ctb, cph], Christian Borgelt [ctb, cph]
Initial release
2021-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.