Tests and Checks Characteristics of R Objects (original) (raw)

https://doi.org/10.32614/CRAN.package.tester

tester provides human readable functions to test characteristics of some common R objects. The main purpose behind tester is to help you validate objects, especially for programming and developing purposes (e.g. creating R packages)

Motivation

I (Gaston Sanchez) developed tester to have a set of functions for testing objects in a friendly way, following the so-called literate programming paradigm.

Without tester: If you want to test if a number is positive, you would do something like this:

number = 10
if (number > 0) TRUE else FALSE

With tester: There is nothing wrong with the previous way of doing things. However, I still wanted to be able to type something like this:

This is what tester offers you. By having functions like [is_positive()](reference/is%5Fpositive.html), it helps your code to be more understandable. The underlying principle is to have tools that get you closer to the literate programming paradigm. That was my purpose for developing tester

Installation

Stable version on CRAN:

Development version on github:

Some examples