Calculate a range of topological properties for one or more phylogenetic trees.

phyloTop(treeList, funcs = "all", normalise = FALSE)

Arguments

treeList

a list or multiPhylo object, or a single tree of class phylo or phylo4. All trees should be binary and rooted; if not they will be coerced into binary rooted trees using multi2di, if possible.

funcs

a list of functions. The default is to apply all of the topological functions from the package, but a subset can be specified instead. The functions available are:

normalise

option to normalise the results of functions where possible. Default is FALSE

Value

A matrix where rows correspond to trees and columns correspond to topological properties.

Author

Michelle Kendall michelle.louise.kendall@gmail.com

Examples

## Apply all of the functions to a list of 10 random trees, each with 50 tips:
phyloTop(rmtree(10,50))
#>    avgLadder cherries colless.phylo ILnumber maxHeight pitchforks sackin.phylo
#> 1   2.500000       19           185       12        13          3          399
#> 2   2.000000       18           131       14        10          8          337
#> 3   2.600000       16           107       18        10          9          323
#> 4   2.000000       17           103       16         8         10          321
#> 5   2.400000       17           148       16        11          8          346
#> 6   2.000000       18           228       14        12         10          426
#> 7   2.000000       19           124       12         9          8          334
#> 8   5.000000       19           236       12        12          8          426
#> 9   3.666667       16           195       18        11          6          391
#> 10  3.200000       14           125       22        10          8          339
#>      stairs1   stairs2
#> 1  0.5102041 0.6802028
#> 2  0.6326531 0.6439597
#> 3  0.6530612 0.6533854
#> 4  0.5510204 0.6927446
#> 5  0.6326531 0.6333167
#> 6  0.5918367 0.6672684
#> 7  0.5102041 0.7188422
#> 8  0.5918367 0.6495456
#> 9  0.6326531 0.6038674
#> 10 0.6530612 0.6170498
## Normalising the results where possible:
phyloTop(rmtree(10,50), normalise=TRUE)
#>     avgLadder cherries colless.phylo  ILnumber maxHeight pitchforks
#> 1  0.04166667     0.80    0.09778912 0.2083333 0.1836735       0.48
#> 2  0.05952381     0.52    0.13010204 0.5000000 0.2040816       0.48
#> 3  0.05555556     0.60    0.10459184 0.4166667 0.2040816       0.48
#> 4  0.04166667     0.64    0.15816327 0.3750000 0.2653061       0.60
#> 5  0.04166667     0.68    0.19557823 0.3333333 0.2653061       0.30
#> 6  0.05208333     0.68    0.10119048 0.3333333 0.2040816       0.60
#> 7  0.05555556     0.76    0.08673469 0.2500000 0.1836735       0.30
#> 8  0.05833333     0.60    0.13265306 0.4166667 0.2244898       0.48
#> 9  0.04166667     0.80    0.09863946 0.2083333 0.2040816       0.36
#> 10 0.06250000     0.64    0.08673469 0.3750000 0.1632653       0.48
#>    sackin.phylo   stairs1   stairs2
#> 1     0.2629513 0.4897959 0.7507223
#> 2     0.2880691 0.6734694 0.5765037
#> 3     0.2582418 0.6734694 0.6087621
#> 4     0.2951334 0.6530612 0.6105791
#> 5     0.3343799 0.6122449 0.6057727
#> 6     0.2660911 0.5918367 0.6858025
#> 7     0.2496075 0.5306122 0.7013912
#> 8     0.2825746 0.6326531 0.6252178
#> 9     0.2558870 0.5102041 0.7002742
#> 10    0.2527473 0.5918367 0.6815878