r80p: R80p recovery function

Description Usage Arguments Value References Examples

View source: R/get_recovery_metrics.R

Description

Ratio of Eighty Percent (R80P). The ratios can be customized.

Usage

1
r80p(ts, ys, r = 0.8, ts_pre = c(-1, -2), ts_post = c(4, 5))

Arguments

ts

Vector containing the times (same size as ys). Perturbation assumed to happen at 0

ys

Vector containing the values (same size as ts)

r

Ratio. Default set to 0.8

ts_pre

Sampling times for estimating Vpre. Default set to -1

ts_post

Sampling times for estimating Vpost. Default set to c(4, 5)

Value

The R80p indicator (R_r_p if r != 0.8 is provided)

References

Frazier, R. J., Coops, N. C., Wulder, M. A., Hermosilla, T., & White, J. C. (2018). Analyzing spatial and temporal variability in short-term rates of post-fire vegetation return from Landsat time series. Remote Sensing of Environment, 205, 32–45. https://doi.org/10.1016/j.rse.2017.11.007

Examples

1
2
3
4
# Generate an example time series
ts <- seq(-2, 10, by = 0.1) # as a vector of times
ys <- 1*(ts<0)+ (-1 + (2/0.5)*(ts))*(ts >= 0)*(ts <= 0+0.5)+(ts > 0.5) # plus a vector of values
r80p(ts, ys)

RETURN-project/GEE.aux documentation built on Dec. 18, 2021, 8:46 a.m.