c-methods | R Documentation |
c
combines a collection of (timed) sequences or sequence rules
into a single object.
## S4 method for signature 'sequences'
c(x, ..., recursive = FALSE)
## S4 method for signature 'timedsequences'
c(x, ..., recursive = FALSE)
## S4 method for signature 'sequencerules'
c(x, ..., recursive = FALSE)
x |
an object. |
... |
(a list of) further objects of the same class as |
.
recursive |
a logical value specifying if the function should descend through lists. |
For c
and unique
an object of the same class as x
.
Method c
is similar to rbind
but with the added twist
that objects are internally conformed matching their item labels.
That is, an object based on the union of item labels is created.
For timed sequences event times are currently conformed as follows:
if the union of all labels can be cast to integer the labels are
sorted. Otherwise, labels not occurring in x
are appended.
The default setting does not allow any object to be of a class
other than x
, i.e. the objects are not combined into a
list.
Christian Buchta
Class
sequences
,
timedsequences
,
sequencerules
,
method
match
.
## continue example
example(ruleInduction, package = "arulesSequences")
s <- c(s1, s2)
s
match(unique(s), s1)
## combine rules
r <- c(r2, r2[1:2])
r
match(unique(r), r2)
## combine timed sequences
z <- as(zaki, "timedsequences")
match(z, c(z[1], z[-1]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.