View source: R/function_prepare.R
| check_repetition | R Documentation | 
check_repetition checks whether the series have identical or
near-identical repetition larger than lmin. if that is the case, throw an
error, the algorithm cannot yet handle these repetition, because variance on
the segment would be null.
check_repetition(x, lmin, rounding = FALSE, magnitude = 3)
x | 
 the bivariate series to be tested  | 
lmin | 
 minimum length of segment  | 
rounding | 
 whether or not series are rounded  | 
magnitude | 
 number of magnitude of standard deviation below which values are rounded. i.e if magnitude = 3, difference smaller than one thousandth of the standard deviation are rounded to the same value.  | 
a boolean, TRUE if there is any repetition larger or equal to lmin.
set.seed(42) 
dat <- rbind(base::sample(seq(1,10),  size= 100, replace = TRUE),
             base::sample(seq(1,10),  size= 100, replace = TRUE))
check_repetition(dat, lmin = 3)
check_repetition(dat, lmin = 5)             
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.