wave.dur {VulnToolkit} | R Documentation |
Find the proportion of time when water surface is near a selected elevation
Description
Find the proportion of time when water surface is near a selected elevation
Usage
wave.dur(level, elevation, buffer = 0.050)
Arguments
level |
a numeric vector of water levels |
elevation |
elevation(s) of interest (e.g., marsh platform, MHW). A vector of
elevations is accepted. Elevation should be in the same vertical datum
as |
buffer |
the vertical range used to calculate exposure. Default is 0.050 meters (5 cm) |
Value
a vector of values representing the fraction of time in the entire dataset where the water surface is near the elevation of interest. Numerical range is from 0-1. NAs are omitted.
Examples
data(NL_6min_2013)
### an elevation of interest: 0.9117 m
MHW <- 0.9117
wave.dur(NL_6min_2013[, 2], MHW)
## Not run:
### function also accepts and returns vectors
elevs <- data.frame(elevs = c(-1000:1500) / 10^3)
elevs$wave.dur <- wave.dur(NL_6min_2013[, 2], elevs$elevs)
plot(elevs ~ wave.dur, data = elevs)
## End(Not run)
[Package VulnToolkit version 1.1.4 Index]