Re: [Rd] R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.

From: Bjørn-Helge Mevik <bhs2_at_mevik.net>
Date: Mon, 08 Oct 2007 11:07:16 +0200

Martin Morgan wrote:

> But both 'new' and 'as' appear to produce invalid (in a different
> sense, I guess) objects:
>
>> setClass("snp", contains="raw",
> + validity=function(object) {
> + if (length(object) < 1) "too short"
> + else TRUE
> + })

Well, you _have_ designed a class with an invalid prototype (as determined by your own validity function). :-)

-- 
Bjørn-Helge Mevik

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 08 Oct 2007 - 08:59:57 GMT

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 Thu 25 Oct 2007 - 11:37:10 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.