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

Try the autocogs package in your browser

Any scripts or data that you put into this service are public.

autocogs documentation built on May 30, 2021, 1:07 a.m.