listTips: List tips descendings from all nodes of a tree

Description Usage Arguments Value Author(s) See Also Examples

View source: R/partition.R

Description

The function listTips lists the tips descending from each node of a tree. The tree can be of class phylo, phylo4 or phylo4d.

Usage

1

Arguments

x

A tree of class phylo, phylo4 or phylo4d.

Value

A list whose components are vectors of named tips for a given node.

Author(s)

Thibaut Jombart tjombart@imperial.ac.uk

See Also

listDD which lists the direct descendants for each node.

treePart which defines partitions of tips according to the tree topology.

Examples

1
2
3
4
5
6
if(require(ape) & require(phylobase)){
## make a tree
x <- as(rtree(20),"phylo4")
plot(x,show.node=TRUE)
listTips(x)
}

Example output

Loading required package: ade4
Registered S3 method overwritten by 'spdep':
  method   from
  plot.mst ape 
Loading required package: ape
Loading required package: phylobase

Attaching package:phylobaseThe following object is masked frompackage:ape:

    edges

[[1]]
t11  t1 t20 t19 t10  t9 t15 t18  t7  t5 t17 t14 t12 t16 t13  t3  t6  t2  t8  t4 
 10   1   2   9   3   8   4   5   6   7  11  12  15  13  14  16  17  18  19  20 

[[2]]
t11  t1 t20 t19 t10  t9 t15 t18  t7  t5 
 10   1   2   9   3   8   4   5   6   7 

[[3]]
 t1 t20 t19 t10  t9 t15 t18  t7  t5 
  1   2   9   3   8   4   5   6   7 

[[4]]
 t1 t20 
  1   2 

[[5]]
t19 t10  t9 t15 t18  t7  t5 
  9   3   8   4   5   6   7 

[[6]]
t10  t9 t15 t18  t7  t5 
  3   8   4   5   6   7 

[[7]]
 t9 t15 t18  t7  t5 
  8   4   5   6   7 

[[8]]
t15 t18  t7  t5 
  4   5   6   7 

[[9]]
t15 t18 
  4   5 

[[10]]
t7 t5 
 6  7 

[[11]]
t17 t14 t12 t16 t13  t3  t6  t2  t8  t4 
 11  12  15  13  14  16  17  18  19  20 

[[12]]
t17 t14 
 11  12 

[[13]]
t12 t16 t13  t3  t6  t2  t8  t4 
 15  13  14  16  17  18  19  20 

[[14]]
t12 t16 t13 
 15  13  14 

[[15]]
t16 t13 
 13  14 

[[16]]
t3 t6 t2 t8 t4 
16 17 18 19 20 

[[17]]
t3 t6 
16 17 

[[18]]
t2 t8 t4 
18 19 20 

[[19]]
t8 t4 
19 20 

adephylo documentation built on May 2, 2019, 4:54 p.m.