itemwiseSetOps | R Documentation |
Provides the generic functions and the methods for itemwise set
operations on items in an itemMatrix. The regular set operations regard each
itemset in an itemMatrix
as an element. Itemwise operations regard each item
as an element and operate on the items of pairs of corresponding itemsets
(first itemset in x
with first itemset in y
, second with second, etc.).
itemUnion(x, y)
itemSetdiff(x, y)
itemIntersect(x, y)
## S4 method for signature 'itemMatrix,itemMatrix'
itemUnion(x, y)
## S4 method for signature 'itemMatrix,itemMatrix'
itemSetdiff(x, y)
## S4 method for signature 'itemMatrix,itemMatrix'
itemIntersect(x, y)
x , y |
two itemMatrix objects with the same number of rows (itemsets). |
An object of class itemMatrix is returned.
Michael Hahsler
data("Adult")
fsets <- eclat(Adult, parameter = list(supp = 0.5))
inspect(fsets[1:4])
inspect(itemUnion(items(fsets[1:2]), items(fsets[3:4])))
inspect(itemSetdiff(items(fsets[1:2]), items(fsets[3:4])))
inspect(itemIntersect(items(fsets[1:2]), items(fsets[3:4])))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.