rollprod: Rolling product

View source: R/primitives.R

rollprodR Documentation

Rolling product

Description

Rolling product

Usage

rollprod(
  x,
  width,
  align = c("right", "left", "center"),
  fill = NA,
  partial = FALSE,
  na.rm = FALSE
)

Arguments

x

An atomic vector.

width

Target width, in characters or rolling-window size depending on the function.

align

Alignment of the rolling window relative to each position.

fill

Value used for positions where no window/result is available.

partial

Allow partial windows at the boundaries.

na.rm

Drop missing values before computing the result.

Value

A numeric vector of rolling products.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.