match finds the positions of first matches of a collection of
sequences or sequence rules in an object of the same class.
%in% indicates matches of the left in the right operand.
If the right operand is a vector of item labels indicates if a
sequence contains any of the items given.
%ain% indicates if a sequence contains all the items given as
the right operand.
%pin% indicates if a sequence contains any item matching
the regular expression given as the right operand.
%ein% indicates if a sequence contains any itemset
containing all the items given as the right operand.
duplicated indicates duplicate occurrences of sequences
or sequence rules.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## S4 method for signature 'sequences,sequences' match(x, table, nomatch = NA_integer_, incomparables = NULL) ## S4 method for signature 'sequencerules,sequencerules' match(x, table, nomatch = NA_integer_, incomparables = NULL) ## S4 methods for signature 'sequences, character': x %in% table x %ain% table x %pin% table x %ein% table ## S4 method for signature 'sequences' duplicated(x, incomparables = FALSE) ## S4 method for signature 'sequencerules' duplicated(x, incomparables = FALSE)
an object (of the same class as
the value to be returned in the case of no match.
match returns an integer vector of the same length as
x containing the position in
table of the first match,
or if there is no match the value of
%pin% returns a
logical vector indicating for each element of
a match was found in the right operand.
duplicated a logical vector corresponding with the
For practical reasons, the item labels given in the right operand
must match the item labels associated with
Currently, an operator for matching against the labels of a set of sequences is not provided. For example, it could be defined as
"%lin%" <- function(l, r) match(r, labels(l)) > 0
with the caveat of being too general.
FIXME currently matching of timed sequences does not take event times into consideration.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.