Hi Emmanuel (and list!),

These changes are appreciated, and will make dealing with multiPhylo
objects much easier. I know I certainly have blocks of code where I
need to 'carry' the multiPhylo class tag through every other line; it
always been a bit of a chore. However, two questions from the peanut
gallery.

1) Does this change result in any change in speed? Have you tested
this? (My guess is no practical computational time change, but I was
curious.)

2) Will those of us using these particular functions due to a
dependency or importing ape functions for our libraries need to alter
the way we call those particular functions? Have you tested this with
R CHECK?

Finally, thank you to you (and the rest of the ape authors) for
continuing to maintain and improve ape.

Cheers,
-Dave

On Mon, Oct 3, 2016 at 8:51 AM, Emmanuel Paradis
<emmanuel.para...@ird.fr> wrote:
> Dear all,
>
> We are planning to introduce a substantial change in ape: several functions
> operating on "phylo" objects will be made generic with methods for "phylo"
> and "multiPhylo" objects. The motivation is to make things simpler when
> working with lists of trees. For instance, for a list of trees TR, testing
> if each tree is rooted can be donc with:
>
> sapply(TR, is.rooted)
>
> With the new version, this would be:
>
> is.rooted(TR)
>
> which is similar than for a "phylo" object. With functions requiring
> additional arguments, e.g., to root all the trees with the same outgroup,
> the current code is slightly more complicated:
>
> TRr <- lapply(TR, root, outgroup = "platypus")
> class(TRr) <- class(TR)
>
> This is because lapply does not propagate the class of its first argument.
> The new code will be as simple as with a "phylo" object:
>
> TRr <- root(TR, "platypus")
>
> To summarize the future changes:
>
> 1/ Functions to become generic with methods for "phylo" and "multiPhylo":
>
> di2multi
> drop.tip
> is.binary (see below)
> is.rooted
> is.ultrametric
> ladderize
> multi2di
> Nedge
> Nnode
> Ntip
> reorder
> root
> unroot
>
> 2/ is.binary.tree() will be renamed is.binary() since the name is available
> (an alias with is.binary.tree will be provided for the next release).
>
> 3/ Functions already with methods for "phylo" and "multiPhylo" in ape
> (nothing to change):
>
> makeLabel (generic defined in ape)
> plot
> print
> summary
>
> 4/ The c() methods (currently for "phylo" and "multiPhylo") will be improved
> by implementing the 'recursive' option (currently ignored). This will permit
> to combine several objects of different classes into a single "multiPhylo"
> object (i.e., either a list of trees, or a list of lists depending on the
> value of 'recursive'; see ?c).
>
> 5/ Functions already with methods for "multiPhylo" (nothing to change):
>
> str
> unique
>
> Comments and suggestions are welcome. These changes will be included in the
> next release of ape which will be version 4.0 and is planned this fall. As a
> reminder, the changes already implemented are listed in:
>
> http://ape-package.ird.fr/NEWS
>
> Best,
>
> Emmanuel
>
> _______________________________________________
> 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