Re: [Rd] strange behavior in 'inherits' check for loaded S4 object

2016-07-29 Thread Kevin Ushey
I have a small idea as to what's going on now; at least, why exporting the class resolves this particular issue. Firstly, when an S4 class is not exported, the associated '.__C__' object is not made part of the package environment. For example, I see: > getAnywhere(".__C__SubMatrix") A si

Re: [Rd] strange behavior in 'inherits' check for loaded S4 object

2016-07-29 Thread Kevin Ushey
I should add one more item that may be related here -- calling 'methods:::.requirePackage' returns a different result based on whether the package namespace is already loaded or not. If the package namespace is not loaded, the package is loaded and attached, and the package environment is returned