cumProdGroup <- function(x,group) {
if (length(x) != length(group))
stop('Length of x and group differs')
r <- .C('cumProdGroup', w = as.double(x), as.integer(length(x)), as.integer(group))
return(r$w)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.