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

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Fri 03 Nov 2006 - 14:44:51 GMT

"Pfaff, Bernhard Dr." <Bernhard_Pfaff@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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Nov 04 01:55:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 03 Nov 2006 - 16:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.