size
computes the size of a sequence. This can be either the number
of (distinct) itemsets (elements) or items occurring in a sequence. ritems
compute the minimum (maximum) number an item or itemset
(element) is repeatedly occurring in a sequence.
## S3 method for class 'sequences':
size(x, type = c("size", "itemsets", "length", "items"))## S3 method for class 'sequences':
ritems(x, type = c("min", "max"), itemsets = FALSE)
x
.sequences
,
timedsequences
.## continue example
example(cspade)
## default size
size(s2)
size(s2, "itemsets")
size(s2, "length")
size(s2, "items")
## crosstab
table(length = size(s1, "length"),
items = size(s1, "items"))
## repetitions
ritems(s1)
ritems(s1, "max")
ritems(s1, "max", TRUE)
Run the code above in your browser using DataLab