[Rd] WG: Formal methods are not loaded from NAMESPACE inreloadedworkspace image

Seth Falcon sfalcon at fhcrc.org
Fri Nov 3 15:44:51 CET 2006


"Pfaff, Bernhard Dr." <Bernhard_Pfaff at fra.invesco.com> writes:

> Sorry, to bother the list one more time: but the following worked at
> least for 'urca':
>
> in NAMESPACE I now included explicitly:
>
> import(methods)
>
> a fix of the 'urca'-package will be uploaded to CRAN on the weekend.
> Fritz, will this work for ypur package 'flexclust' too? I have in my
> DESCRIPTION imports: methods and in flexclust it is in depends: methods.
> However, both packages have not import(methods) in their NAMESPACE.
> Anyway, I wonder why 'import(methods)' is explicitly needed in
> NAMESPACE? Would a smart and bright soul be so kind and enlighten a
> flabbergasted one? :-) Many thanks!

Because 4 > 1.

I share your flabbergasted state.  As I understand it, if you want to
use methods, you might need to:

1. Say so in .onLoad where you require(methods)

2. Certainly Depends: methods

3. As you found, in the NAMESPACE file it helps to import(methods)

4. But then you also need to Import: methods

+ seth



More information about the R-devel mailing list