search for: myconstructor2

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

Did you mean: myconstructor
2012 Dec 12
1
Lost in S4 and S3 classes
...t; pippo An object of class "TestClass" Slot "lmOutput": <S4 Type Object> attr(,".S3Class") [1] "nls.lm" Slot "anumeric": numeric(0) And the object "pippo" seems correctly initialized. If I use this code instead I got an error: myConstructor2 <- function() { pippo <- new("TestClass", anumeric=1000) return(pippo) } > pippo <- myConstructor2() Error in validObject(.Object) : invalid class ?TestClass? object: invalid object for slot "lmOutput" in class "TestClass": got class "S4",...