sets | R Documentation |
Provides the generic functions and the methods for the set operations
union()
, intersect()
, setequal()
, setdiff()
and
is.element()
on sets of associations (e.g., rules, itemsets) and
itemMatrix.
## S3 method for class 'itemMatrix'
union(x, y, ...)
## S3 method for class 'associations'
union(x, y, ...)
## S4 method for signature 'associations'
union(x, y, ...)
## S4 method for signature 'itemMatrix'
union(x, y, ...)
## S3 method for class 'itemMatrix'
intersect(x, y, ...)
## S3 method for class 'associations'
intersect(x, y, ...)
## S4 method for signature 'associations'
intersect(x, y, ...)
## S4 method for signature 'itemMatrix'
intersect(x, y, ...)
## S3 method for class 'itemMatrix'
setequal(x, y, ...)
## S3 method for class 'associations'
setequal(x, y, ...)
## S4 method for signature 'associations'
setequal(x, y, ...)
## S4 method for signature 'itemMatrix'
setequal(x, y, ...)
## S3 method for class 'itemMatrix'
setdiff(x, y, ...)
## S3 method for class 'associations'
setdiff(x, y, ...)
## S4 method for signature 'associations'
setdiff(x, y, ...)
## S4 method for signature 'itemMatrix'
setdiff(x, y, ...)
## S3 method for class 'itemMatrix'
is.element(el, set, ...)
## S3 method for class 'associations'
is.element(el, set, ...)
## S4 method for signature 'associations'
is.element(el, set, ...)
## S4 method for signature 'itemMatrix'
is.element(el, set, ...)
x , y , el , set |
sets of associations or itemMatrix objects. |
... |
Other arguments are unused. |
Technical note: All S4 methods for set operations are defined for the class name
"ANY"
in the signature, so they should work for all S4 classes for
which the following methods are available: match()
, length()
and
unique()
.
union()
, intersect()
, setequal()
and setdiff()
return an object of the same class as x
and y
.
is.element()
returns a logic vector of length el
indicating for
each element if it is included in set
.
Michael Hahsler
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()
,
size()
,
sort()
,
unique()
Other itemMatrix and transactions functions:
abbreviate()
,
c()
,
crossTable()
,
duplicated()
,
extract
,
hierarchy
,
image()
,
inspect()
,
is.superset()
,
itemFrequency()
,
itemFrequencyPlot()
,
itemMatrix-class
,
match()
,
merge()
,
random.transactions()
,
sample()
,
size()
,
supportingTransactions()
,
tidLists-class
,
transactions-class
,
unique()
data("Adult")
## mine some rules
r <- apriori(Adult)
## take 2 subsets
r1 <- r[1:10]
r2 <- r[6:15]
union(r1, r2)
intersect(r1, r2)
setequal(r1, r2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.