[Rd] [Q] Package NS Hook Lint NOTE

From: Roebuck,Paul L <proebuck_at_mdanderson.org>
Date: Wed, 14 Sep 2011 12:53:39 -0500

Have a question about the following NOTEs appearing on CRAN checks:

> .onLoad calls:
> require(methods)
> Package startup functions should not change the search path.
> See section ŒGood practiceš in ?.onAttach.

For years, I have had the following in my S4-requiring packages.

.onLoad <- function(libname, pkgname) {
    ## In case namespace is loaded (via import) by package that
    ## doesn't depend on S4 methods and used in a session with
    ## non-default set of packages


It was all based on an explanation Prof. Ripley gave to someone about some package loading corner case (reference lost to history though circa R-2.7 or before). Is it no longer an issue?

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 14 Sep 2011 - 17:56:13 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 19 Sep 2011 - 23:40:32 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.

list of date sections of archive