View source: R/anlz_fibwetdry.R
anlz_fibwetdry | R Documentation |
Identify Fecal Indicator Bacteria samples as coming from a 'wet' or 'dry' time period
anlz_fibwetdry(fibdata, precipdata, temporal_window = 2, wet_threshold = 0.5)
fibdata |
input data frame |
precipdata |
input data frame as returned by |
temporal_window |
numeric, number of days precipitation should be summed over (1 = day of sample only; 2 = day of sample + day before; etc.) |
wet_threshold |
numeric, inches accumulated through the defined temporal window, above which a sample should be defined as being from a 'wet' time period |
This function allows the user to specify a threshold for declaring a sample to be taken after an important amount of rain over an important amount of days, and declaring it to be 'wet'. This is of interest because samples taken after significant precipitation (definitions of this vary, which is why the user can specify desired thresholds) are more likely to exceed relevant bacterial thresholds. Identifying samples as 'wet' or not allows for calculation of further indices for wet and dry subsets of samples.
a data frame; the original fibdata data frame with three additional columns. rain_sampleDay
is the total rain (inches) on the day of sampling, rain_total
is the total rain (inches) for the period of time defined by temporal_window
, and wet_sample
is logical, indicating whether the rainfall for that station's catchment exceeded the amount over the time period specified in args.
entero_wetdry <- anlz_fibwetdry(enterodata, catchprecip)
head(entero_wetdry)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.