search for: isrefclassobject

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

2011 Mar 10
1
Testing for a reference class object
Hi all, I've constructed the following function to test whether or not an object was created from a reference class: isRefClassObject <- function(x) isS4(x) && is.environment(attr(x,'.xData')) && exists('.refClassDef',attr(x,'.xData')) but I'm unsure if it's a complete test or if there's a better way to test. Regardless, It would be nice to have such a function in the method...