This was exactly what I needed -- thanks a lot!!Best,Ivan
--
Dr. Ivan L. F. Magalhaes
Postdoctoral fellow — División AracnologíaMuseo Argentino de Ciencias Naturales
"Bernardino Rivadavia"
Av. Ángel Gallardo 470, C1405DJR, Buenos Aires, Argentina+54 11 4982-8370 ext.
169Website | ResearchGate
Hi Ivan.
Try this simple code:
## load packages
library(phytools)
library(phangorn)
## get tips descended from each node
dd<-Descendants(tree,node=1:tree$Nnode+Ntip(tree),
type="tips")
names(dd)<-1:tree$Nnode+Ntip(tree)
## get the NUMBER of tips from each node
nn<-sapply(dd,length)
## get
Hi all,
Perhaps a dumb question, but is there an easy way to count the number of
cherries in a given tree, and fetch their ages? (i.e. all the nodes with
exactly two descendants)
Thanks! Best,Ivan
--
Dr. Ivan L. F. Magalhaes
Postdoctoral fellow — División AracnologíaMuseo Argentino de Ciencias