R/utils.R

Defines functions check_qd_class

# common check for first two arguments in all these functions
check_qd_class <- function(discharge, dates) {

  if (!is.numeric(discharge)) {
    stop("discharge must be 'numeric' class")
  }
  if (!(class(dates)[1] %in% c("Date", "POSIXlt", "POSIXct"))) {
    stop("dates must be a 'Date', 'POSIXct', or 'POSIClt' class")
  }
  NULL
}

Try the adc package in your browser

Any scripts or data that you put into this service are public.

adc documentation built on March 7, 2023, 6:40 p.m.