Re: [Rd] S4 changes - sp fails

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 01 Sep 2006 - 05:35:08 GMT

Roger,

I had managed to run R CMD check on sp successfully on r39021 and r39043 (current) in my nightly checks. (There are a couple of tests where the show/print method is not being invoked, but that is not new.)

All I can suggest is to install R from scratch (make distclean), and then reinstall all relevant packages. At a guess, your interactive use and R CMD check are picking up different libraries.

There are around a dozen S4-using packages on CRAN that are currently failing their checks: some look like newly-discovered bugs but some look like problems in S4 dispatch (even of S3 dispatch for S3 generics turned into S4 generics). More are producing apparently incorrect warnings.

Brian

On Thu, 31 Aug 2006, Roger Bivand wrote:

> Under R version 2.4.0 (2006-08-30 r39024), sp fails CMD check following
> the latest changes in methods.
>
> The failures are in running examples and occur in CMD check:
>
> > data(state)
> > dd2dms(state.center$x)
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "initialize", for
> signature "integer"
>
> Offending code:
>
> deg <- as(floor(dd), "integer")
>
> After replacing by as.integer(floor(dd)), it fails on the local class
> definition:
>
> > dd2dms(state.center$x)
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "initialize", for
> signature "DMS"
>
> Installing sp, example("DMS-class") runs successfully interactively
> (other examples do too).
>
> The methods package is declared as Depends: in DESCRIPTION, and
> import(methods) in NAMESPACE;
>
> .onLoad <- function(lib, pkg) require(methods) is in the first R source
> file in Collate: order.
>
> Should the methods package be being invoked in some other way, is there a
> reason why the installed package appears to run examples successfully that
> fail under CMD check?
>
> Roger
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Sep 01 16:50:14 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 Wed 06 Sep 2006 - 11:39:09 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.