search for: myclassaornul

Displaying 1 result from an estimated 1 matches for "myclassaornul".

Did you mean: myclassaornull
2010 Jul 21
1
Bug: broken exception handling in S4 methods
...(c(1,2)) }) ## OK (error in constructor) er = try({ MyClassA(c(1,2)) }) ## OK (error evaluating argument to a function) er = try({ sin(MyClassA(c(1,2))) }) # Now consider we define MyClassB that has MyClassA in a slot # and we define a constructor that takes such objects: setClassUnion("MyClassAOrNULL", c("MyClassA", "NULL")) setClass("MyClassB", representation( ca = "MyClassAOrNULL" ), prototype(ca = NULL) ) setGeneric("MyClassB", function(x) standardGeneric("MyClassB")) setMethod("MyClassB",...