Learn R Programming

arules (version 0.4-2)

is.superset: Find Super and Subsets

Description

Provides the generic functions and the S4 methods is.subset and is.superset for finding super or subsets in associations and itemMatrix objects.

Usage

is.subset(x, y = NULL, proper = FALSE)
is.superset(x, y = NULL, proper = FALSE)

Arguments

x, y
associations or itemMatrix objects. If y = NULL, the super or subset structure within set x is calculated.
proper
"logical"; all or just proper super or subsets.

Value

  • returns a logical matrix with length(x) rows and length(y) columns. Each logical row vector represents which elements in y are supersets (subsets) of the corresponding element in x. If either x or y have lenght zero, NULL is returned instead of a matrix.

Details

looks for each element in x which elements in y are supersets or subsets. Note that the method can be very slow and memory intensive if x and/or y contain many elements.

See Also

associations-class, itemMatrix-class

Examples

Run this code
data("Adult")
set <- eclat(Adult, parameter = list(supp = 0.8))

### find the supersets of each itemset in set
is.superset(set, set)

Run the code above in your browser using DataLab