logicals: Combine or negate checkr_results

Description Usage Arguments Examples

Description

The outcome of a checkr test is an object of class checkr_result that indicates whether the test was passed or failed or was sufficient to move on to additional tests.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
res1 %or% res2

res1 %and% res2

## S3 method for class 'checkr_result'
res1 %or% res2

## S3 method for class 'checkr_result'
res1 %and% res2

not(res1)

Arguments

res1

the first checkr result

res2

the second checkr result

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# normally these results are made by the checking functions
code <- for_checkr(quote(1))
pa <- check(code, passif(V==1, "Good!"))
pb <- check(code, passif(V==1, "Great!"))
fa <- check(code, failif(V==1, "too bad"))
fb <- check(code, failif(V==1, "sorry"))
oka <- check(code, noteif(V==1, "note a"))
okb <- check(code, noteif(V==1, "note b"))
pa %or% pb
pa %and% pb
fa %or% fb
fa %and% fb
oka %or% okb
oka %and% okb
oka %and% fa
oka %or% fa
pa %or% fa
pa %and% fa
pa %or% oka
pa %and% oka
checkr2::not(pa)
checkr2::not(fa)

dtkaplan/checkr2 documentation built on May 17, 2019, 4:01 p.m.