Calculate a range of topological properties for one or more phylogenetic trees.
phyloTop(treeList, funcs = "all", normalise = FALSE)
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.
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:
stairs
(note that this adds two columns to the output, "stairs1" and "stairs2")
option to normalise the results of functions where possible. Default is FALSE
A matrix where rows correspond to trees and columns correspond to topological properties.
## 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.250000 16 102 18 10 8 326
#> 2 2.333333 17 146 16 11 9 344
#> 3 3.333333 16 223 18 13 6 411
#> 4 2.333333 18 95 14 9 7 315
#> 5 2.400000 15 101 20 9 10 323
#> 6 3.666667 15 178 20 13 9 376
#> 7 3.000000 16 162 18 12 8 364
#> 8 2.750000 16 167 18 12 10 365
#> 9 3.000000 14 187 22 12 11 381
#> 10 2.250000 16 142 18 11 8 342
#> stairs1 stairs2
#> 1 0.5918367 0.6429354
#> 2 0.6122449 0.6347048
#> 3 0.6326531 0.5880005
#> 4 0.5510204 0.7047983
#> 5 0.6122449 0.6476444
#> 6 0.6734694 0.5885160
#> 7 0.6122449 0.6095640
#> 8 0.5918367 0.6438705
#> 9 0.6938776 0.6015093
#> 10 0.6530612 0.6266751
## Normalising the results where possible:
phyloTop(rmtree(10,50), normalise=TRUE)
#> avgLadder cherries colless.phylo ILnumber maxHeight pitchforks
#> 1 0.04166667 0.76 0.09778912 0.2500000 0.2040816 0.60
#> 2 0.04861111 0.64 0.14710884 0.3750000 0.2244898 0.60
#> 3 0.04166667 0.72 0.08928571 0.2916667 0.2040816 0.48
#> 4 0.04166667 0.76 0.14540816 0.2500000 0.2448980 0.42
#> 5 0.04166667 0.68 0.10544218 0.3333333 0.2040816 0.42
#> 6 0.07291667 0.60 0.09948980 0.4166667 0.2040816 0.60
#> 7 0.06250000 0.72 0.14370748 0.2916667 0.2244898 0.42
#> 8 0.04687500 0.72 0.10544218 0.2916667 0.2040816 0.42
#> 9 0.04687500 0.68 0.10374150 0.3333333 0.2040816 0.54
#> 10 0.05729167 0.60 0.17431973 0.4166667 0.2448980 0.66
#> sackin.phylo stairs1 stairs2
#> 1 0.2566719 0.5510204 0.7292962
#> 2 0.2959184 0.6122449 0.6326441
#> 3 0.2551020 0.5510204 0.6932177
#> 4 0.2943485 0.5918367 0.6656566
#> 5 0.2668760 0.6122449 0.6499187
#> 6 0.2566719 0.6530612 0.6234052
#> 7 0.2927786 0.5714286 0.6519053
#> 8 0.2653061 0.5714286 0.6726322
#> 9 0.2637363 0.6122449 0.6694549
#> 10 0.3147567 0.6326531 0.5836043