times-methods | R Documentation |
Computes the gaps, the minimum or maximum gap, or the span of sequences.
## S4 method for signature 'timedsequences'
times(x, type = c("times", "gaps", "mingap", "maxgap", "span"))
x |
an object. |
type |
a string value specifying the type of statistic. |
If type = "items"
returns a list of vectors of events times
corresponding with the elements of a sequence.
If type = "gaps"
returns a list of vectors of time differences
between consecutive elements of a sequence.
Otherwise, a vector corresponding with the elements of x
.
Gap statistics are not defined for sequences of size one, i.e. which
contain a single element. NA
is used for undefined values.
FIXME lists are silently reduced to vector if possible.
Christian Buchta
Class
sequences
,
timedsequences
,
method
size
,
itemFrequency
,
timeFrequency
.
## continue example
example("timedsequences-class")
##
times(z)
times(z, "gaps")
## all defined
times(z, "span")
## crosstab
table(size = size(z), span = times(z, "span"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.