View source: R/sequence_thresh.R
sequence_thresh | R Documentation |
Thresholds correlation between all segments length n of a vector
sequence_thresh(sequ, threshold = 1, tolerance = sqrt(.Machine$double.eps))
sequ |
Output of |
threshold |
Minimum correlation to accept. Defaults to 1, possible range -1 to 1 (but values much below 1 make no sense) |
tolerance |
Small positive number to allow for numerical imprecision |
Tests if correlations are >= than a given threshold (with tolerance for imprecision in correlations). Default threshold is 1 (perfect correlation). Might be useful to reduce this slightly, or equivalently increase tolerance to allow for cases where imprecision is high.
set.seed(42) x <- rnorm(10) x <- c(x, x[1:4] + 2.03) sequ <- sequence_cor(vec = x, n = 4) sequence_thresh(sequ)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.