R/is_tidytable.R

Defines functions is_tidytable

Documented in is_tidytable

#' Test if the object is a tidytable
#'
#' @description
#' This function returns TRUE for tidytables or subclasses of tidytables, and FALSE for all other objects.
#'
#' @param x An object
#'
#' @export
#'
#' @examples
#' df <- data.frame(x = 1:3, y = 1:3)
#'
#' is_tidytable(df)
#'
#' df <- tidytable(x = 1:3, y = 1:3)
#'
#' is_tidytable(df)
is_tidytable <- function(x) {
  inherits(x, "tidytable")
}

Try the tidytable package in your browser

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

tidytable documentation built on Oct. 5, 2023, 5:07 p.m.