[Rd] R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.
Bjørn-Helge Mevik
bhs2 at mevik.net
Mon Oct 8 11:07:16 CEST 2007
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
More information about the R-devel
mailing list