# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Accumulate vector based on conditional threshold
#'
#' The vector will accumulate each pair of adjacent elements, similar to \code{\link[base]{Reduce}} with the accumulate parameter.
#' If the summation of the two elements is greater than the threshold, the returned value of that cycle is zero. Primary use is within
#' \code{\link{assign_episode}} function to provide a speed boost in the looping procedure.
#'
#' @param x Numeric vector.
#' @param threshold Integer value.
#' @return Numeric vector.
#' @export
accumulate_threshold <- function(x, threshold) {
.Call(`_farrago_accumulate_threshold`, x, threshold)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.