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),
annote = list())
)
setGeneric("phylo4", function(x, ...) { standardGeneric("phylo4")} )
setMethod("phylo4", "matrix",
function(x, annote = list()) {
res <- new("phylo4")
res@edge <- x
res@annote <- annote
res
}
)
edge <- structure(c(6L, 7L, 8L, 8L, 9L, 9L, 7L, 6L, 7L, 8L, 1L, 9L,
2L, 3L, 4L, 5L), .Dim = c(8, 2))
phylo4(edge, annote="foo")
On Mon, Jan 14, 2013 at 1:39 PM, Martin Maechler <[email protected]
> wrote:
> phylo4 <- setClass("phylo4",
> representation(edge = "matrix",
> edge.length = "numeric",
> label = "character",
> edge.label = "character",
> order = "character",
> annote = "list"),
> prototype = list(edge = matrix(nrow = 0, ncol = 2,
> dimnames = list(NULL,
> c("ancestor", "descendant"))),
> edge.length = numeric(0),
> label = character(0),
> edge.label = character(0),
> order = "unknown",
> annote = list()
> )
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel