itemFrequency and S4 methods to get the
frequency/support for all single items in an objects based on
itemMatrix. For example, it is used to get the single
item support from an object of class transactions
without mining.
itemFrequency(x, ...)
"itemFrequency"(x, type, weighted = FALSE)"relative" frequency/support or "absolute"
frequency/support (item counts) is returned. (default: "relative").
"weight" in transactionInfo?"relative" frequency/support or "absolute"
frequency/support (item counts) is returned. (default: "relative").
"weight" in transactionInfo?itemFrequency returns a named numeric vector. Each element is the
frequency/support of the corresponding item in object x. The items
appear in the vector in the same order as in the binary matrix in x.
itemFrequencyPlot,
itemMatrix-class,
transactions-class
data("Adult")
itemFrequency(Adult, type = "relative")
Run the code above in your browser using DataLab