[R-pkg-devel] Weird error on CRAN linux check

Iñaki Úcar i@uc@r86 @ending from gm@il@com
Thu Jul 5 10:07:01 CEST 2018


El mié., 4 jul. 2018 a las 22:47, Duncan Murdoch
(<murdoch.duncan using gmail.com>) escribió:
>
> On 04/07/2018 4:04 PM, Joris Meys wrote:
> >
> >
> > On Wed, Jul 4, 2018 at 9:31 PM, Duncan Murdoch <murdoch.duncan using gmail.com
> > <mailto:murdoch.duncan using gmail.com>> wrote:
> >
> >
> >     That shouldn't matter.  That function was created in a local
> >     environment whose parent is <environment: namespace:huxtable>
> >     (probably by the huxtable:::make_setter_getters function, but I
> >     didn't check).
> >
> >     Duncan Murdoch
> >
> > I would think it does matter. Methods are found on the search path, but
> > the environment where the methods are defined is not on the search path.
> > It's a child environment of the namespace, and hence cannot be reached
> > from either the global environment or the namespace if I understood it
> > correctly.
> >
>
> The environment of a function is where it looks for objects, not where
> it is stored.  That method is stored in the huxtable namespace, and
> exported from it.  That's why
> getFromNamespace("align.huxtable","huxtable") (or even
> huxtable::align.huxtable) finds it.
>
> I don't know the source of the original error.

I don't know either. But obviously it has something to do with the
function environment and how UseMethod looks for methods when they are
exported from a namespace (I tested a similar "layout" in the global
environment and the method is correctly found). So maybe this thread
belongs to r-devel instead.

Iñaki

>
> Duncan Murdoch
>



More information about the R-package-devel mailing list