unroll: Recover original data series from moving average

Description Usage Arguments

View source: R/unroll.R

Description

Recover original data series from moving average

Usage

1
2
3
4
5
6
7
unroll(
  moving_series,
  original_seed,
  window_length,
  align = c("left", "right"),
  window_function = c("mean", "sum")
)

Arguments

moving_series

a vector of moving averages

original_seed

a vector of the first or last numbers of the original series–must be window_length - 1 or longer

window_length

integer length of the window

align

character specifying whether the index of the original series was left- or right-aligned or centered (default) compared to the rolling window of series

window_function

what function was used to roll up the original data


NateByers/IUHhelpers documentation built on Feb. 25, 2020, 8:43 p.m.