convert_ppy_to_cumulative: Convert percent per year trend to cumulative trend

View source: R/trends.R

convert_ppy_to_cumulativeR Documentation

Convert percent per year trend to cumulative trend

Description

Convert percent per year trend to cumulative trend

Usage

convert_ppy_to_cumulative(x, n_years)

Arguments

x

numeric; percent per year trend on the 0-100 scale rather than the 0-1 scale.

n_years

integer; number of years.

Value

A numeric vector of the same length as x that contains the cumulative trend resulting from n_years years of compounding annual trend.

Examples

ppy_trend <- runif(100, min = -100, 100)
cumulative_trend <- convert_ppy_to_cumulative(ppy_trend, n_years = 5)
cbind(ppy_trend, cumulative_trend)

ebirdst documentation built on July 21, 2026, 1:08 a.m.