R/seqle.R

seqle <-
function (x, incr = 1) 
{
    if (!is.numeric(x)) 
        x <- as.numeric(x)
    n <- length(x)
    y <- x[-1L] != x[-n] + incr
    i <- c(which(y | is.na(y)), n)
    list(lengths = diff(c(0L, i)), values = x[head(c(0L, i) + 
                                                       1L, -1L)])
}

Try the QDComparison package in your browser

Any scripts or data that you put into this service are public.

QDComparison documentation built on June 24, 2019, 9:04 a.m.