Tristan,

It's alright. To be honest, I am (and should be) quite embarrassed
that I overlooked an ape function... I was a nice warm-up exercise,
nonetheless, and I can see how to extend it to handle dates for
non-ultrametric fossil trees, which is a case not covered by
compute.brtimes, and would make a nice addition for paleotree.

Glad we could help!

Cheers,
-Dave

On Wed, Oct 28, 2015 at 9:03 AM, Tristan Lefebure
<tristan.lefeb...@gmail.com> wrote:
> David, Emmanuel, many thanks!
>
> chrono3 <-  compute.brtime(tr, bt)
> all.equal.numeric(chrono$edge.length, chrono3$edge.length)
> #TRUE
> all.equal.numeric(chrono$edge.length, as.numeric(chrono2$edge.length))
> #also TRUE
>
> PS: sorry David, I feel kinda responsible for this lost 16 minutes...
>
>
>
> On Wed, Oct 28, 2015 at 3:53 PM, Emmanuel Paradis <emmanuel.para...@ird.fr>
> wrote:
>
>> Hi Tristan,
>>
>> See compute.brtime in ape.
>>
>> Cheers,
>>
>> Emmanuel
>>
>>
>> Le 28/10/2015 15:31, Tristan Lefebure a écrit :
>>
>>> Greetings all,
>>>
>>> Does anyone know a way to transform branching times into branch length of
>>> a
>>> chronogram. Like the inverse function of ape::branching.time() ?
>>>
>>> say you have a chronogram named chrono:
>>>
>>> tr <- chrono
>>> tr$edge.length <- NULL
>>> bt <- branching.times(chrono)
>>> chrono2 <- magical.function.here(bt, tr)
>>>
>>> here I want :
>>>
>>> all(chrono2$edge.length == chrono$edge.length)
>>>
>>> This would be helpful in situations such as parsing the mcmctree output
>>> (mcmc.txt) that are made of sampled branching times by the MCMC (a big
>>> table with row=iteration and col=node age) and then, say, run the same
>>> diversification analysis on the MCMC trees to get some credibility
>>> intervals on the diversification parameters.
>>>
>>> Thanks !
>>>
>>> --
>>> Tristan
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>> Searchable archive at
>>> http://www.mail-archive.com/r-sig-phylo@r-project.org/
>>>
>>>
>>> Pour nous remonter une erreur de filtrage, veuillez vous rendre ici :
>>> http://f.security-mail.net/301eSIrvP0A
>>>
>>>
>>>
>>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/



-- 
David W. Bapst, PhD
Adjunct Asst. Professor, Geology and Geol. Eng.
South Dakota School of Mines and Technology
501 E. St. Joseph
Rapid City, SD 57701

http://webpages.sdsmt.edu/~dbapst/
http://cran.r-project.org/web/packages/paleotree/index.html

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to