ConditionKeeper: ConditionKeeper

Description Arguments Details See Also Examples

Description

ConditionKeeper

Arguments

times

(integer) number of times to throw condition. required. default: 1

condition

(character) which condition, one of "message" (default) or "warning"

Details

Methods

See Also

handle_conditions()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
x <- ConditionKeeper$new(times = 4)
x
x$get_id()
x$add("one")
x$add("two")
x
x$thrown_already("one")
x$thrown_already("bears")
x$not_thrown_yet("bears")

x$add("two")
x$add("two")
x$add("two")
x$thrown_times("two")
x$thrown_enough("two")
x$thrown_enough("one")

foo <- function(x) {
  message("you gave: ", x)
  return(x)
}
foo('a')
x$handle_conditions(foo('a'))

x <- ConditionKeeper$new(times = 4, condition = "warning")
x
x$add("one")
x$add("two")
x

conditionz documentation built on May 2, 2019, 6:19 a.m.