Re: [Rd] Same class name, different package

From: John Chambers <jmc_at_r-project.org>
Date: Sun, 24 Jul 2011 14:58:23 -0700

A point that has come up a couple of times with the new test is that two classes from two packages may be "the same class". Should that turn on duplicate classes?

One situation where the answer seems to be No is when the two classes are identical declarations of S3 classes, via setOldClass().

A recent update (rev. 56492) tries to check for equivalent classes, with some special leeway for that case, and does not turn on the duplicate class flag. It's not clear what is really needed or wanted in all circumstances, so further experience will be helpful.

05qlink4"> name="0205qlink4"><a name="0205qlink4">ame="0205qlink4">name="0205qlink4"> name="0205qlink4"><a name="0205qlink4">If duplicate classes do exist, a utility findDuplicateClasses(details = FALSE) will give the names of the duplicated classes. It's not yet exported so you need to call methods:::findDuplicateClasses()

John

On 7/21/11 10:29 AM, John Chambers wrote:
> In principle, two separately developed packages could use the same
> class name, and a user could then attach both and attempt to use
> methods for both classes.
>
> That has never worked, but some changes have been added to r-devel to
> handle this case. The changes involve extending the "signature" class
> to include package information. For compatibility, packages will need
> to be re-installed from a version of R labelled 56466 or later,
> although an attempt is made to fill in missing information.
>
> John
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 24 Jul 2011 - 22:01:06 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 25 Jul 2011 - 09:00:11 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