check_dtt: Check dtt Object

Description Usage Arguments Value See Also Examples

View source: R/check.R

Description

Checks whether x is a dtt object

Usage

1
2
3
4
check_dtt(x, values = NULL, nas = TRUE, length = NA,
  unique = FALSE, sorted = FALSE, floored = FALSE,
  complete = FALSE, tz = dtt_tz(x), units = dtt_units(x),
  named = NA, x_name = substitute(x), error = TRUE)

Arguments

x

The object to check.

values

NULL or a vector specifying the values.

nas

A flag indicating whether missing values are permitted.

length

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

unique

A flag indicating whether the values must be unique.

sorted

A flag indicating whether the vector must be sorted.

floored

A flag indicating whether x should be floored.

complete

A flag indicating whether x should be complete.

tz

A string of the time zone.

units

A string of the units.

named

A flag indicating whether the vector must be named or unnamed or NA if it doesn't matter.

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

See Also

check_vector

Examples

1
2
3

poissonconsulting/dttr documentation built on Feb. 20, 2021, 12:18 a.m.