#' @keywords internal
consecutive_sums <- function(vec) {
indices = seq(1:length(vec))
sums = sapply(indices, function(x) {
return (sum(vec[1:x]))
})
return (sums)
}
#' @keywords internal
ace_sum <- function(x) {
return (sum(to_numeric(x), na.rm = TRUE))
}
#' @keywords internal
sea_sum_adj <- function(x) {
return (sum(to_numeric(x), na.rm = TRUE) - (sum(!is.na(x)) - sum(to_numeric(x), na.rm = TRUE)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.