Re: [Rd] Regarding the recent changes to @<-

2013-01-14 Thread John Chambers
My guess is that the distinction here is between `@<-` and `slot<-`. The first, but not the second, has been converted to a primitive (the second has an optional argument, making it more of a nuisance to implement.) Previously they did the same check; after the revision of `@<-` they did not; a

Re: [Rd] Regarding the recent changes to @<-

2013-01-14 Thread François Michonneau
Hello Martin, Below is a reduced version of our code that doesn't produce an error in r61643 but does in 2.15.2. Thanks, -- François setClass("phylo4", representation(edge="matrix", annote="list"), prototype = list(edge = matrix(nrow = 0, ncol = 2

Re: [Rd] Regarding the recent changes to @<-

2013-01-14 Thread Martin Maechler
> François Michonneau > on Sun, 13 Jan 2013 18:34:36 -0500 writes: > Hello all, > In one of the packages (phylobase) I'm contributing to, we define a class > as follows: > setClass("phylo4", > representation(edge = "matrix", > edge.length

Re: [Rd] Regarding the recent changes to @<-

2013-01-14 Thread François Michonneau
Thanks John. Just to clarify further my previous message, the other slots were returning error messages when provided with objects of the incorrect class, but not the slot that was supposed to be a list. Cheers, -- François On Mon, Jan 14, 2013 at 12:54 PM, John Chambers wrote: > Thank

Re: [Rd] Regarding the recent changes to @<-

2013-01-14 Thread John Chambers
Thanks. No need for a complicated example actually: > C1 <- setClass("C1", slots = c(x = "numeric")) > c1 <- C1() > c1@x <- "Hello" > validObject(c1) Error in validObject(c1) : invalid class "C1" object: invalid object for slot "x" in class "C1": got class "character", should be or extend cla

[Rd] Regarding the recent changes to @<-

2013-01-13 Thread François Michonneau
Hello all, In one of the packages (phylobase) I'm contributing to, we define a class as follows: setClass("phylo4", representation(edge = "matrix", edge.length = "numeric", label = "character", edge.label = "charac