[Rd] Internal flag for S4 objects

From: John Chambers <jmc_at_r-project.org>
Date: Sun 03 Sep 2006 - 15:53:46 GMT


A recent revision (svn version 39077) has introduced an internal flag (a bit in the C structure) that is turned on by the code that generates objects from an S4 class.

There are corresponding tests for an S4 object, isS4() in R and IS_S4_OBJECT() in C. These are fast and reliable, and should replace any heuristic tests previously used.

The tests are not currently used widely, but in the future could be combined with some of the other recent changes to improve reliability and efficiency of computations with S4 objects. Most such changes are more likely for 2.5.x than 2.4.0.

S4 objects in saved sessions and other binary files will not have the bit set, so they should be regenerated. A likely symptom that you have not done so is that the objects will not print automatically with the standard S4 method, because the internal code now checks for an S4 object before dispatching show().

John



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Sep 04 01:58:48 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:23 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.