Learn R Programming

arules (version 0.1-4)

itemSupport: Getting the Support of all Items

Description

Provides the generic function itemSupport and S4 methods to get the support of all items in a objects based on itemMatrix. For example, it is used to get the item support from an object of class transactions without mining.

Usage

itemSupport(x, ...)
## S3 method for class 'itemMatrix':
itemSupport(x, type)
## S3 method for class 'itemMatrix':
itemSupport(x, type)

Arguments

x
an object.
...
further arguments are passed on.
type
a character specifying if "relative" support or "absolute" support (item counts) is returned. (default: "relative").

Value

  • itemSupport returns a named numeric vector. Each element is the itemSupport of the corresponds to an item in object x with the same name. The items in the vector appear in the order of the item appearance in the binary matrix.

See Also

itemMatrix-class, transactions-class

Examples

Run this code
data("Adult_transactions")
itemSupport(Adult_transactions)

Run the code above in your browser using DataLab