Re: [R-sig-phylo] Problem - removing the extinct taxa from trees

2020-08-25 Thread Elvira D`bastiani
Hi Liam, That, are branch lengths. I know that these NaNs correspond to the species that have become extinct. When I talk about 'delete' the NaNs, I want my newick not to have those branches with NaNs. You helped me! Thank you for talking about it with me! All the best, Em ter., 25 de ago. de

Re: [R-sig-phylo] Problem - removing the extinct taxa from trees

2020-08-25 Thread Liam J. Revell
Hi Elvira. In your Newick string those NaN are branch lengths, not taxon labels. What do you mean by 'delete' the NaNs? You can set them to zero, as follows: tree$edge.length[is.na(tree$edge.length)]<-0 but then you get a tree that looks like this:

Re: [R-sig-phylo] Problem - removing the extinct taxa from trees

2020-08-25 Thread Elvira D`bastiani
Dear Liam, Thanks for your answer. It got a little clearer. But I still can't resolve my error ;( Thanks Best regards Elvira Em ter., 25 de ago. de 2020 às 17:33, Liam J. Revell escreveu: > Dear Elvira. > > I'm not sure what's going on with the NaN values, but one issue that I > see with

Re: [R-sig-phylo] Problem - removing the extinct taxa from trees

2020-08-25 Thread Liam J. Revell
Dear Elvira. I'm not sure what's going on with the NaN values, but one issue that I see with your example is that ape::drop.fossil identifies fossil lineages by finding those that end before the present. Since rtree just splits the tree randomly & samples the edge lengths from a uniform

[R-sig-phylo] Problem - removing the extinct taxa from trees

2020-08-25 Thread Elvira D`bastiani
Hi, I'm a beginner with phylogeny analysis. I'm having trouble extracting only the surviving species from the phylogenies of my model. I used the drop.fossil (fPar) functions from ape and the drop.extinct (fPar) from geiger. But it is not deleting the way I need it. Running example correctly: