Defines functions dl6

Documented in dl6

#' Function to return the DL6 hydrologic indicator statistic for a given data frame
#' This function accepts a data frame that contains a column named "discharge" and calculates 
#' DL6; Variability of annual minimum daily average flow. Compute the standard deviation for the minimum daily 
#' average flow. DL6 is 100 times the standard deviation divided by the mean (percent-spatial).
#' @param qfiletempf data frame containing a "discharge" column containing daily flow values
#' @return dl6 numeric containing DL6 for the given data frame
#' @export
#' @examples
#' qfiletempf<-sampleData
#' dl6(qfiletempf)
dl6 <- function(qfiletempf) {
  meandl6 <- dl1(qfiletempf, pref = "mean")
  annualminimum <- aggregate(qfiletempf$discharge, list(qfiletempf$wy_val), min)
  sddl6 <- sd(annualminimum$x)
  dl6 <- (sddl6 * 100)/meandl6
jlthomps/EflowStats documentation built on May 19, 2019, 12:48 p.m.