#' Get cumulative counts
#'
#' This function applies cumsum to each row of a dataframe or matrix
#'
#' @param data A numeric matrix or dataframe
#' @return A matrix or dataframe
#' @export
get_cumulative_counts <- function(data) {
df <- t(apply(data, 1, cumsum))
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.