Inheritance in R
With regards to R, Can someone explain to me, with regards to object inheritance, if I have S4 object X, which contains Y, if Y has an initializer, how can that initializer be called from within the initializer of X, when X is constructed. Martin Morgan A first pass, not quite good enough Here are two classes .A <- setClass("A", representation(a="integer")) .B <- setClass("B", contains="A", representation(b="integer")) The symbol .A is a class generator function (essentially a call to new() ), and is a relatively new addition to the methods package. Here we write an initialize,A-method, using