R/of_type.R

Defines functions is_discrete is_numeric is_date

is_date <- function(x) {
  inherits(x, "Date") ||
  inherits(x, "Time") ||
  inherits(x, "Datetime")
}

is_numeric <- function(x) {
  is.numeric(x)
}

is_discrete <- function(x) {
  !is_numeric(x)
}
schloerke/autocog documentation built on May 30, 2021, 5:09 p.m.