| is.superset | R Documentation |
Provides the generic functions is.subset() and is.superset(), and the methods
for finding super or subsets in associations and
itemMatrix objects.
is.superset(x, y = NULL, proper = FALSE, sparse = TRUE, ...)
is.subset(x, y = NULL, proper = FALSE, sparse = TRUE, ...)
## S4 method for signature 'itemMatrix'
is.superset(x, y = NULL, proper = FALSE, sparse = TRUE)
## S4 method for signature 'associations'
is.superset(x, y = NULL, proper = FALSE, sparse = TRUE)
## S4 method for signature 'itemMatrix'
is.subset(x, y = NULL, proper = FALSE, sparse = TRUE)
## S4 method for signature 'associations'
is.subset(x, y = NULL, proper = FALSE, sparse = TRUE)
x, y |
associations or itemMatrix objects. If |
proper |
a logical indicating if all or just proper super or subsets. |
sparse |
a logical indicating if a sparse Matrix::ngCMatrix rather than a dense logical matrix should be returned. Sparse computation requires a significantly smaller amount of memory and is much faster for large sets. |
... |
currently unused. |
Determines 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 are very dense (contain many items).
For rules, the union of lhs and rhs is used a the set of items.
returns a logical matrix or a sparse Matrix::ngCMatrix
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 length zero, NULL is returned instead of a matrix.
Michael Hahsler and Ian Johnson
Other postprocessing:
is.closed(),
is.generator(),
is.maximal(),
is.redundant(),
is.significant()
Other associations functions:
abbreviate(),
associations-class,
c(),
duplicated(),
extract,
inspect(),
is.closed(),
is.generator(),
is.maximal(),
is.redundant(),
is.significant(),
itemsets-class,
match(),
rules-class,
sample(),
sets,
size(),
sort(),
unique()
Other itemMatrix and transactions functions:
abbreviate(),
c(),
crossTable(),
duplicated(),
extract,
hierarchy,
image(),
inspect(),
itemFrequency(),
itemFrequencyPlot(),
itemMatrix-class,
match(),
merge(),
random.transactions(),
sample(),
sets,
size(),
supportingTransactions(),
tidLists-class,
transactions-class,
unique()
data("Adult")
set <- eclat(Adult, parameter = list(supp = 0.8))
### find the supersets of each itemset in set
is.superset(set, set)
is.superset(set, set, sparse = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.