[EMAIL PROTECTED] (Bjørn-Helge Mevik) writes: > 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). :-)
Yeah, its true I did, but the software let me get away with it. Even with a valid protoytpe I can as(raw(), "snp"). Martin > -- > Bjørn-Helge Mevik > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel