check_dts: Check DateTime-Series Data Frame

View source: R/check.R

check_dtsR Documentation

Check DateTime-Series Data Frame

Description

A dts data frame is a data frame with a column of Date or POSIXct values.

Usage

check_dts(
  x,
  dtt = "DateTime",
  colname = character(0),
  nrow = NA,
  nas = TRUE,
  floored = TRUE,
  sorted = FALSE,
  unique = FALSE,
  complete = FALSE,
  units = dttr2::dtt_units(x[[dtt]]),
  tz = dttr2::dtt_tz(as.POSIXct(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 other values.

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.

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).

Examples

check_dts(dts_data)

poissonconsulting/dts documentation built on March 10, 2024, 6:21 a.m.