mlr-org / mlr3misc

Miscellaneous helper functions for mlr3
https://mlr3misc.mlr-org.com
GNU Lesser General Public License v3.0
11 stars 2 forks source link

Assign private #69

Closed sebffischer closed 2 years ago

sebffischer commented 2 years ago

Allow

a = lrn("regr.rpart")
get_private(a, ".train") = function(x) print("hallo world")
mllg commented 2 years ago

Note that you should be aware that you cannot access self, private or super in functions you have assigned this way.

So better don't use this for functions at all (and document this)