packrat/lib-R/x86_64-w64-mingw32/3.6.1/methods/tests/nextWithDots.R

setClass("A")
setClass("B", contains = c("array", "A"))
a = array(1:12, c(2,3,4))
bb = new("B", a)
a2 = array(8:1, rep(2,3))
stopifnot(identical(initialize(bb, a2), new("B",a2)))

withDots <- function(x, ...) names(list(...))

setGeneric("withDots")

setClass("C", representation(x="numeric", y="character"))

setMethod("withDots", "C", function(x, ...)
          callNextMethod()
          )
stopifnot(identical(withDots(1, a=1, b=2), withDots(new("C"), a=1, b=2)))
removeClass("C"); removeClass("B"); removeClass("A")
removeGeneric("withDots")
rm(a, bb, a2)
jmcascalheira/LGMIberiaCluster documentation built on June 8, 2021, 10 a.m.