R/cumSumGroup.R

cumSumGroup <- function(x,group) {
  if (length(x) != length(group))
    stop('Length of x and group differs')
  r <- .C('cumSumGroup', w = as.double(x), as.integer(length(x)), as.integer(group))
  return(r$w)
}
kjetilroysland/ahw documentation built on May 20, 2019, 10:25 a.m.