R/cms.R
get_longest_run.Rd
Identifies the length of the longest run of TRUEs in Boolean vector x. used to be maxCMS
x
maxCMS
get_longest_run(x)
Boolean vector
an integer value of the length of the longest run of TRUE values
x <- rbinom(100, size = 1, prob = 1 / 3) get_runs(x == 1) # expected value for longest match is 3 #> #> 1 2 #> 12 8 get_longest_run(x == 1) #> [1] 2