```
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)
}
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.