size {arules}R Documentation

Getting the Size of All Elements

Description

Provides the generic function size and S4 methods to get the size of all elements from objects based on itemMatrix. For example, it is used to get a vector of transaction sizes (i.e., the number of present items (ones) per element (row) of the binary incidence matrix) from an object of class transactions).

Usage

size(x)
## S4 method for signature 'itemMatrix':
size(x)

Arguments

x an object.

Value

size returns a numeric vector of length length(x). Each element is the size of the corresponding element (row in the matrix) in object x.

Author(s)

Michael Hahsler

See Also

itemMatrix-class, transactions-class

Examples

data("Adult_transactions")
size(Adult_transactions)

[Package arules version 0.1-1 Index]