knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

chex

Lifecycle: experimental

Installation

# install.packages("devtools")
devtools::install_github("shunsambongi/chex")

Example

check_that() takes an object you want to check, and a number of checks to run against the object. A check is usually a function that takes the object as the first argument and returns a boolean value of whether the check passed (TRUE) or failed (FALSE).

library(chex)
library(magrittr)

results <- mtcars %>%
  check_that(
    is.data.frame, # this should PASS
    is.character,  # this should FAIL
  )

print(results)


shunsambongi/chex documentation built on Aug. 21, 2022, 5:19 a.m.