Re: [R-sig-phylo] covriance matrix internal nodes

2011-11-23 Thread Liam J. Revell
Here is an alternative version that is more than twice as fast (helpful for large trees), and only a little bit slower than vcv.phylo(): vcvPhylo2-function(tree,anc.nodes=T){ n-length(tree$tip.label) h-nodeHeights(tree)[order(tree$edge[,2]),2] h-c(h[1:n],0,h[(n+1):length(h)])

[R-sig-phylo] covriance matrix internal nodes

2011-11-21 Thread ppiras
Hi all, Having a tree (NOT ultrametric in my case) I would like to extract the phylogenetic covariance matrix including both tips and nodes (like dist.nodes for patristic distances). vcv returns the cov matric just for tips. Someone has a fast way? Thankyou very much Paolo