| itemFrequencyPlot {arules} | R Documentation |
Provides the generic function itemFrequencyPlot and the S4 method
to create an item frequency bar plot for inspecting
the item frequency distribution for objects based on
itemMatrix (e.g.,
transactions,
or items in
itemsets
and
rules).
itemFrequencyPlot(x, ...)
## S4 method for signature 'itemMatrix':
itemFrequencyPlot(x, type = "relative", cex.names = par("cex.axis"), ...)
x |
the object to be plotted. |
... |
further arguments are passed on (see
barplot from possible arguments). |
type |
indicates whether item frequencies should be displayed relative of absolute. |
cex.names |
expansion factor for axis names (bar labels). |
A numeric vector with the midpoints of the drawn bars; useful for adding to the graph.
Michael Hahsler
data(Adult_transactions) # the following example compares the item frequencies # of people with a rage income (boxes) with the average in the data set # box plot for young people (first 72 items) midpoints <- itemFrequencyPlot( Adult_transactions[Adult_transactions %in% "income = large", 1:72]) # add the item frequency over all transactions (first 72 items) lines(midpoints, itemSupport(Adult_transactions[, 1:72]))