March 2018
Beginner to intermediate
570 pages
13h 42m
English
The assertr check aims to make the checking of assumptions so effortless that the user never feels the need to hold back any implicit assumption. Therefore, it's expected that the user uses multiple checks on one data frame.
The usage examples that we've seen so far are really only appropriate for one or two checks. For example, a usage pattern such as the following is clearly unworkable:
iris <- CHECKING_CONSTRUCT4(CHECKING_CONSTRUCT3(CHECKING_CONSTRUCT2(CHECKING_CONSTRUCT1(this, ...), ...), ...), ...)
To combat this visual cacophony, assertr provides direct support for chaining multiple assertions by using the piping construct from the magrittr package.
The pipe operator of magrittr, %>%, works as follows: it takes ...