[Rd] Reference classes: assignments to fields

From: John Chambers <jmc_at_r-project.org>
Date: Sun, 31 Jul 2011 11:27:44 -0700

In R-devel, a recent change (Rev. 56572) makes assignments to fields in reference classes consistent with assignments to slots in S4 classes, when the field was declared with a class in the call to setRefClass().

The value assigned must come from the declared class for the field, if any, or from a subclass of that class. Previously, if the field had a declared class the value for assignment was unconditionally coerced to that class.

The added test may produce new error messages, e.g., if you declare a field "integer" and assign a numeric, such as 1 rather than 1L.


R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 31 Jul 2011 - 18:30:53 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 01 Aug 2011 - 03:30:13 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