R/scripts/R6.R

library(R6)

IFoo <- R6Class("IFoo",
  public = list(foo = function() stop("I'm the inferace method"))
)
BaseClass <- R6Class("BaseClass",
  public = list(foo = function(n = 1) private$x[1:n])
)
Foo <- R6Class("Foo", inherit = c(IFoo, BaseClass),
  private = list(x = letters)
)
rappster/jirar documentation built on May 26, 2019, 11:19 p.m.