hydroperiod | R Documentation |
Calculates the duration of inundation, either continuous or discontinuous
hydroperiod(data, threshold = 0, continuous = TRUE, percent = FALSE)
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) |
numeric hydroperiod
returns a numeric value with time units equivalent to the time increments in input data
dat <- 1:100
hydroperiod(data = dat, threshold = 75, continuous = TRUE)
## Not run:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.