Checks whether x is a dtt object
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)
| 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. |
An invisible copy of x (if it doesn't throw an error).