Identify the length of runs (of values TRUE) and their frequencies.
Examples
x <- rbinom(100, size = 1, prob = 1 / 3)
get_runs(x == 1) # expected value for longest run is 3
#>
#> 1 2 4 5
#> 15 5 1 1
get_runs(x == 0) # expected value for longest run is 6
#>
#> 1 2 3 4 5 6
#> 4 7 5 3 3 1