Hi,
(sorry for the wall of text; the issue here appears to be rather complicated)
I'm seeing a somewhat strange case where checking whether an S4 object
inherits from a parent class defined from another package with
'inherits' fails if that object is materialized through a call to
'load'. That's
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
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
> Kevin Ushey
> on Fri, 29 Jul 2016 11:46:19 -0700 writes:
> 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 packa
(Just returning from the "wilds" of Canada, so not able to comment on the
specifics, but ...)
There is a basic point about generic functions that may be related to the
"private" class question and my earlier remarks that Martin alluded to.
R (and S4 before it) allows packages to define methods
Hi Martin, John,
Thanks for the responses! I've tidied up some of the notes from this
mailing list thread and posted them on the bug tracker.
John, in this case, I think namespaces are relevant because for
non-exported S4 classes, the class information is made available
through the '.__C__' symbo
Agreed that this looks like a real bug, and is independent of how one regards
the more general issue about specifying methods for a public generic and a
non-exported class.
John
On Aug 2, 2016, at 11:48 AM, Kevin Ushey wrote:
> Hi Martin, John,
>
> Thanks for the responses! I've tidied up so