hydroperiod: Quantifies hydroperiod (continuous or discontinuous)

View source: R/hydroperiod.R

hydroperiodR Documentation

Quantifies hydroperiod (continuous or discontinuous)

Description

Calculates the duration of inundation, either continuous or discontinuous

Usage

hydroperiod(data, threshold = 0, continuous = TRUE, percent = FALSE)

Arguments

data

input dataset (e.g., one year of stage data for a point/pixel)

threshold

threshold value for determining inundation. Note: values equal to or greater than the threshold count as inundated.

continuous

if TRUE, the quantity calculated is continuous hydroperiod (largest run of consecutive days inundated). If 'FALSE', the function returns discontinuous hydroperiod (total days inundated in record)

percent

if TRUE, returned value is expressed as a fraction of all non-NA observations. This may not be meaningful in all cases (e.g., continuous hydroperiod)

Value

numeric hydroperiod returns a numeric value with time units equivalent to the time increments in input data

Examples

dat <- 1:100
hydroperiod(data = dat, threshold = 75, continuous = TRUE)
## Not run: 


 

troyhill/EvergladesEBM documentation built on Nov. 19, 2023, 8:39 a.m.