knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
# install.packages("devtools") devtools::install_github("shunsambongi/chex")
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.