trle_cond_stat {nseq} | R Documentation |
Statistics of events in a sequence
Description
This function will compute statistics of sequential events that meets some conditions.
Usage
trle_cond_stat(x, b, b_op, stat)
Arguments
x |
numeric vector. |
b |
integer. Value threshold. |
b_op |
character. Operator, |
stat |
character. A statistic to be calculated. One of: max, min, mean, median, sd, var. |
Details
Example: in a vector, what is the maximum size of sequences with values equal or greater than 5?
Value
a numeric value
Examples
# What is the maximum size of sequences with values equal or greater than 5?
trle_cond_stat(c(4,6,6,4,7,8,9), b = 5, b_op = "gte", stat = "max")
[Package nseq version 0.1.1 Index]