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 Nov. 5, 2025, 6:52 p.m.