R/is_duckplyr_df.R

Defines functions is_duckplyr_df

Documented in is_duckplyr_df

#' Class predicate for duckplyr data frames
#'
#' Tests if the input object is of class `"duckplyr_df"`.
#'
#' @param .data The object to test
#'
#' @return `TRUE` if the input object is of class `"duckplyr_df"`,
#'   otherwise `FALSE`.
#'
#' @export
#' @examples
#' tibble(a = 1:3) %>%
#'   is_duckplyr_df()
#'
#' tibble(a = 1:3) %>%
#'   as_duckplyr_df() %>%
#'   is_duckplyr_df()
is_duckplyr_df <- function(.data) {
  inherits(.data, "duckplyr_df")
}
duckdblabs/duckplyr documentation built on Nov. 6, 2024, 10 p.m.