diffya: Compute year-over-year difference for annual data

View source: R/btools_stats.r

diffyaR Documentation

Compute year-over-year difference for annual data

Description

Compute year-over-year difference for annual data

Usage

diffya(value, year)

Arguments

value

numeric vector

year

integer or numeric vector

Value

numeric vector

Examples

set.seed(1234)
year <- 1970:1990
value <- 100 * (1 + .05 + rnorm(length(year), 0, .002))
cbind(year, value, diffya(value, year))

donboyd5/btools documentation built on Jan. 7, 2023, 10:47 p.m.