Provides the generic function size()
and methods to get the size of
each itemset in an itemMatrix or associations. For
example, size()
can be used to get a vector with the number of items in each
transaction.
size(x, ...)# S4 method for itemMatrix
size(x)
# S4 method for tidLists
size(x)
# S4 method for itemsets
size(x)
# S4 method for rules
size(x)
returns a numeric vector of length length(x)
.
Each element is the size of the corresponding element (row in the itemMatrix) in
object x
. For rules, size()
returns the sum of the number of
items in the LHS and the RHS.
an object.
further (unused) arguments.
Michael Hahsler
Other itemMatrix and transactions functions:
abbreviate()
,
crossTable()
,
c()
,
duplicated()
,
extract
,
hierarchy
,
image()
,
inspect()
,
is.superset()
,
itemFrequencyPlot()
,
itemFrequency()
,
itemMatrix-class
,
match()
,
merge()
,
random.transactions()
,
sample()
,
sets
,
supportingTransactions()
,
tidLists-class
,
transactions-class
,
unique()
Other associations functions:
abbreviate()
,
associations-class
,
c()
,
duplicated()
,
extract
,
inspect()
,
is.closed()
,
is.generator()
,
is.maximal()
,
is.redundant()
,
is.significant()
,
is.superset()
,
itemsets-class
,
match()
,
rules-class
,
sample()
,
sets
,
sort()
,
unique()
data("Adult")
summary(size(Adult))
Run the code above in your browser using DataLab