itemFrequency

0th

Percentile

Getting Frequency/Support for Single Items

Provides the generic function 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.

Keywords
models
Usage
itemFrequency(x, ...)

# S4 method for itemMatrix itemFrequency(x, type, weighted = FALSE)

Arguments
x

an object.

further arguments are passed on.

type

a character string specifying if "relative" frequency/support or "absolute" frequency/support (item counts) is returned. (default: "relative").

weighted

should support be weighted by transactions weights stored as column "weight" in transactionInfo?

Value

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.

See Also

itemFrequencyPlot, itemMatrix-class, transactions-class

Aliases
  • itemFrequency
  • itemFrequency,itemMatrix-method
  • itemFrequency,tidLists-method
Examples
# NOT RUN {
data("Adult")
itemFrequency(Adult, type = "relative")
# }
Documentation reproduced from package arules, version 1.5-4, License: GPL-3

Community examples

Looks like there are no examples yet.