I guess this function is specially useful to our group in which we play with L table.
L table is an alternative way to a phylo class for phylogenetic information storage. The function L2phylo
has been implemented in the DDD package that converts an L table to a phylo class. This function phylo2L
does the conversion the other way around. Thus, if you want to apply your model to an empirical data. This may be useful to you.
phylo2L
function can be found here if you want to improve the function. I have verified it by examining if
1 | L=phylo2L(L2phylo(L)) |
Notice that phylo2L
doesn’t have the argument dropextinct
as what L2phylo
has. Because to my perspective L table should be consistent with the given phylo class. But if you have a full tree on hand and want to prune it, you can do it like this
1 | prune_phylo = L2phylo(phylo2L(full tree), dropextinct = TRUE) |
Or you can use pruneL
function that I have developed to prune an L table. More details on pruneL
function can be found in this post.