-## vcv.phylo.R (2006-10-04)
+## vcv.phylo.R (2009-07-06)
## Phylogenetic Variance-Covariance or Correlation Matrix
-## Copyright 2002-2006 Emmanuel Paradis
+## Copyright 2002-2009 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
vcv.phylo <- function(phy, model = "Brownian", cor = FALSE)
{
- if (class(phy) != "phylo")
+ if (!inherits(phy, "phylo"))
stop('object "phy" is not of class "phylo"')
if (is.null(phy$edge.length))
stop("the tree has no branch lengths")
}
}
+ phy <- reorder(phy)
n <- length(phy$tip.label)
n.node <- phy$Nnode
N <- n.node + n