# length

##### Getting the Number of Elements

S4 methods for `length`

which return the number of elements of
objects defined in the package arules.

- Keywords
- attribute

##### Usage

# S4 method for rules
length(x)

# S4 method for itemsets
length(x)

# S4 method for tidLists
length(x)

# S4 method for itemMatrix
length(x)

##### Arguments

##### Details

For `'>itemMatrix`

and `'>transactions`

the
length is defined as the number of rows (transactions) in the binary
incidence matrix.

For sets of associations (`'>rules`

,
`'>itemsets`

and `'>associations`

in
general) the length is defined as the number of elements in the set (i.e.,
the number of rules or itemsets).

For `'>tidLists`

the length is the number of lists (one per
item or itemset) in the object.

##### Value

An integer scalar giving the “length” of `x`

.

*Documentation reproduced from package arules, version 1.5-5, License: GPL-3*