deprecated_binding {mlr3} | R Documentation |
Create an Active Binding that Generates a Deprecation Warning
Description
Creates an active binding that generates a warning when accessed, using
warn_deprecated()
. The active binding will otherwise be read-only.
Usage
deprecated_binding(what, value)
Arguments
what |
(character(1)) |
value |
(any) |
Examples
MyClass = R6::R6Class("MyClass", public = list(),
active = list(
foo = deprecated_binding("MyClass$foo", "bar")
)
)
mco = MyClass$new()
mco$foo
[Package mlr3 version 1.0.1 Index]