R/cumSumGroup.R

Defines functions cumSumGroup

Documented in cumSumGroup

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 18, 2017, 8:40 p.m.