rolling_quarter_sum: Compute rolling quarter sums with circular wrapping

View source: R/primitives.R

rolling_quarter_sumR Documentation

Compute rolling quarter sums with circular wrapping

Description

For each starting month (1-12), computes the sum of 3 consecutive months with circular wrapping (month 13 = month 1, month 14 = month 2).

Usage

rolling_quarter_sum(x, na.rm = FALSE)

Arguments

x

A numeric vector of length 12 (monthly values).

na.rm

Logical. If TRUE, missing values are skipped.

Value

A numeric vector of length 12 with rolling quarter sums.


xbioclim documentation built on Oct. 5, 2026, 5:08 p.m.