View source: R/sequence_longest.R
sequence_longest | R Documentation |
Finds the longest sequence of (offset) duplicate values
sequence_longest(vec, min = 4, max, ...)
vec |
Numeric vector to test for (offset) duplicate values |
min |
Minimum length sequence to search for. Recommend at least 4 to avoid false positives |
max |
Maximum length sequence to search for. If missing, finds longest possible. |
... |
arguments to sequence_thresh |
Loops to find the longest possible sequence of (offset) duplicate values.
set.seed(42) x <- rnorm(10) x <- c(x, x[1:4] + 2.03) sequence_longest(vec = x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.