library("alttip")
counter <- Counter$new()
counter$increment()
counter$increment(by = 2)
counter$value()[1] 3
An R6 class, kept deliberately small. Exists to show another case reftip can’t resolve: a call through $, like counter$increment(), since nothing in the source says which class’s methods to look up (see reftip’s known limitations).
Counter$new()
Create a new counter.
Counter\$new(start = 0)
start
Counter$increment()
Increment the counter.
Counter\$increment(by = 1)
by
Counter$value()
Read the current value.
Counter\$value()
Counter$clone()
The objects of this class are cloneable with this method.
Counter\$clone(deep = FALSE)
deep