| c | R Documentation |
Provides the methods to combine several associations or transactions objects into a single object.
## S4 method for signature 'itemMatrix'
c(x, ..., recursive = FALSE)
## S4 method for signature 'transactions'
c(x, ..., recursive = FALSE)
## S4 method for signature 'tidLists'
c(x, ..., recursive = FALSE)
## S4 method for signature 'rules'
c(x, ..., recursive = FALSE)
## S4 method for signature 'itemsets'
c(x, ..., recursive = FALSE)
x |
first object. |
... |
further objects of the same class as |
recursive |
a logical. If |
Combining arules objects is done by combining the rows of itemMatrix objects representing the associations or transactions.
Note that c() can result in duplicates.
Use generics::union() rather than c() to combine several mined
itemsets or rules into a single
set without duplicates.
An object of the same class as x.
Michael Hahsler
Other associations functions:
abbreviate(),
associations-class,
duplicated(),
extract,
inspect(),
is.closed(),
is.generator(),
is.maximal(),
is.redundant(),
is.significant(),
is.superset(),
itemsets-class,
match(),
rules-class,
sample(),
sets,
size(),
sort(),
unique()
Other itemMatrix and transactions functions:
abbreviate(),
crossTable(),
duplicated(),
extract,
hierarchy,
image(),
inspect(),
is.superset(),
itemFrequency(),
itemFrequencyPlot(),
itemMatrix-class,
match(),
merge(),
random.transactions(),
sample(),
sets,
size(),
supportingTransactions(),
tidLists-class,
transactions-class,
unique()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.