Skip to content
/ checkr Public

object conformance checking made easy

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

kkmann/checkr

Repository files navigation

checkr

Travis build status Codecov test coverage

Object conformance checking made easy.

Installation

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")

Example

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)
[1] NA
f(-1)
[1] "positive: -1.000e+00 < 0.000e+00"

works for arrays as well:

g <- function(some_array = matrix(1:4, nrow = 2)) {
    evaluate(ge(3), some_array) 
}
cat(g())
some_array[1, 1]: 1.000e+00 < 3.000e+00

some_array[2, 1]: 2.000e+00 < 3.000e+00

About

object conformance checking made easy

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages