Last chance! 50% off unlimited learning
Sale ends in
Provides the S4 methods to combine several objects based on
'>itemMatrix
into a single object.
Note, use union
rather than c
to combine several mined
'>itemsets
(or '>rules
) into a single
set.
# S4 method for itemMatrix
c(x, ..., recursive = FALSE)# S4 method for transactions
c(x, ..., recursive = FALSE)
# S4 method for rules
c(x, ..., recursive = FALSE)
# S4 method for itemsets
c(x, ..., recursive = FALSE)
first object.
further objects of the same class as x
to be combined.
a logical. If recursive=TRUE
,
the function recursively
descends through lists combining all their elements into a
vector.
An object of the same class as x
.
itemMatrix-class
,
transactions-class
,
rules-class
,
itemsets-class
# NOT RUN {
data("Adult")
## combine transactions
a1 <- Adult[1:10]
a2 <- Adult[101:110]
aComb <- c(a1, a2)
summary(aComb)
## combine rules (can contain the same rule multiple times)
r1 <- apriori(Adult[1:1000])
r2 <- apriori(Adult[1001:2000])
rComb <- c(r1, r2)
rComb
## union of rules (a set with only unique rules: same as unique(rComb))
rUnion <- union(r1,r2)
rUnion
# }
Run the code above in your browser using DataLab