R/fastSumID2.R

fastSumID2 <- function (x, group) {
    y <- c(0, cumsum(x)[group])
    out <- y[-1L] - y[-length(y)]
    if (anyNA(out))
        out[is.na(out)] <- -Inf
    out
}

Try the JMbayes package in your browser

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

JMbayes documentation built on Jan. 9, 2020, 9:07 a.m.