From roebuck at mdanderson.org  Mon Nov 21 23:10:35 2005
From: roebuck at mdanderson.org (Paul Roebuck)
Date: Mon, 21 Nov 2005 16:10:35 -0600 (CST)
Subject: [Rd] NAMESPACE, S4, and .onLoad
In-Reply-To: <m2veylzop6.fsf@fhcrc.org>
References: <m2veylzop6.fsf@fhcrc.org>
Message-ID: <Pine.OSF.4.58.0511211604050.13497@wotan.mdacc.tmc.edu>

On Mon, 21 Nov 2005, Seth Falcon wrote:

> The Writing R Extensions manual instructs developers who use S4
> classes and methods in a package with a name space to:
>
>     There needs to be an .onLoad action to ensure that the methods package
>     is loaded and attached:
>
>          .onLoad <- function(lib, pkg) require(methods)
>
> I'm wondering if listing methods in the Depends field of the package's
> DESCRIPTION file is sufficient.  My understanding is that doing so
> will result in the methods package being loaded and attached.

Using DCF Depends provides same service and better documents
the external dependency. The manual should reflect this.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



[Rd] NAMESPACE, S4, and .onLoad
Paul Roebuck