R/FlowDailyToYearly.R

Defines functions Flow.DailyToYearly

Documented in Flow.DailyToYearly

#' Internal Helper Flow.DailyToYearly
#'
#' ...
#'
#' @param ...
#'
#' @return Returns the desired output
#'
#'
#' @import data.table
#' @export


Flow.DailyToYearly <- function(dat) {

  setDT(dat)
  setkey(dat, YR)

    dat <- dat[,list(
      FLOW = sum(FLOW),
      SRFL = sum(SRFL),
      SLFL = sum(SLFL),
      BYFL = sum(BYFL),
      DSFL = sum(DSFL),
      VRFLN = sum(VRFLN)
    ),
    by = list(YR)]

  return(dat)

}
rhabel/modLWFB90 documentation built on Nov. 21, 2024, 3:28 a.m.