Allow user of R6 class to provide function which access `self`
Goal I want to tweak the following R6 class such that calc is not hard coded but can be provided by the user. Hard Coded library(R6) A <- R6Class("A", public = list( run = function(x) { private$calc(x) }, result_codes = list(OK = 1, NOK = 2) ), private = list( calc = function(x) { if… Read More Allow user of R6 class to provide function which access `self`