knitr::opts_chunk$set( collapse = TRUE, comment = "", fig.path = "man/figures/README-", out.width = "100%" )
Object conformance checking made easy.
You can install the released version of checkr from CRAN with:
install.packages("checkr")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("kkmann/checkr")
This is a basic example which shows you how to solve a common problem:
library(checkr) f <- function(positive) { evaluate(ge(0), positive) # we need to do something useful (throw errors etc later) } f(1)
f(-1)
works for arrays as well:
g <- function(some_array = matrix(1:4, nrow = 2)) { evaluate(ge(3), some_array) } cat(g())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.