R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.
bhs2 at mevik.net (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 at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel