check_dtq: Check DateTime Discharge Data Frame

View source: R/check.R

check_dtqR Documentation

Check DateTime Discharge Data Frame

Description

A dts data frame is a data frame with a column of Date or POSIXct values and at least one double column of Discharge or Stage data.

Usage

check_dtq(
  x,
  dtt = "DateTime",
  colname = "Discharge",
  nrow = NA,
  nas = TRUE,
  floored = TRUE,
  sorted = FALSE,
  unique = FALSE,
  complete = FALSE,
  rate_down = Inf,
  rate_up = rate_down,
  units = dttr2::dtt_units(x[[dtt]]),
  tz = dttr2::dtt_tz(x[[dtt]]),
  exclusive = FALSE,
  order = FALSE,
  x_name = NULL,
  error = TRUE
)

Arguments

x

A dts data frame

dtt

A string specifying the column with the Date or POSIXct values.

colname

A character vector specifying the column(s) with the discharge and/or stage data.

nrow

A flag indicating whether x should have rows (versus no rows) or a missing value indicating no requirements or a count or count range of the number of rows.

nas

A flag indicating whether missing values are permitted.

floored

A flag indicating whether x should be floored.

sorted

A flag indicating whether the vector must be sorted.

unique

A flag indicating whether the values must be unique.

complete

A flag indicating whether x should be complete.

rate_down

A positive number of the maximum absolute rate when dropping the discharge.

rate_up

A positive number of the maximum rate when increasing the discharge.

units

A string of the units.

tz

A string of the time zone.

exclusive

A flag indicating whether other columns are not permitted.

order

A flag indicating whether the columns have to occur in the same order as values.

x_name

A string of the name of the object.

error

A flag indicating whether to throw an informative error or immediately generate an informative message if the check fails.

Value

An invisible copy of x (if it doesn't throw an error).


poissonconsulting/dtq documentation built on March 10, 2024, 8:14 a.m.