R devel archive: Re: [Rd] NAMESPACE, S4, and .onLoad

Re: [Rd] NAMESPACE, S4, and .onLoad

From: Paul Roebuck <roebuck_at_mdanderson.org>
Date: Mon 21 Nov 2005 - 22:10:35 GMT

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)

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Nov 22 09:15:44 2005

This archive was generated by hypermail 2.1.8 : Tue 22 Nov 2005 - 02:21:35 GMT