From sfalcon at fhcrc.org  Fri Nov  3 15:44:51 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Fri, 03 Nov 2006 06:44:51 -0800
Subject: [Rd] WG: Formal methods are not loaded from NAMESPACE
	inreloadedworkspace image
In-Reply-To: <E4A9111DA23BA048B9A46686BF727CF461BDFD@DEFRAXMB01.corp.amvescap.net>
	(Bernhard Pfaff's message of "Fri, 3 Nov 2006 10:50:26 -0000")
References: <E4A9111DA23BA048B9A46686BF727CF461BDFD@DEFRAXMB01.corp.amvescap.net>
Message-ID: <m2hcxgpp24.fsf@ziti.local>

"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



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