Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

size

Number of Items


Description

Provides the generic function size and S4 methods to get the size of each element 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, ...)

Arguments

x

an object.

...

further (unused) arguments.

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. For rules, size returns the sum of the number of elements in the LHS and the RHS.

Author(s)

Michael Hahsler

See Also

Examples

data("Adult")
summary(size(Adult))

arules

Mining Association Rules and Frequent Itemsets

v1.6-7
GPL-3
Authors
Michael Hahsler [aut, cre, cph], Christian Buchta [aut, cph], Bettina Gruen [aut, cph], Kurt Hornik [aut, cph], Ian Johnson [ctb, cph], Christian Borgelt [ctb, cph]
Initial release
2021-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.