sister: Identification of Sister Nodes and Clades

Description Usage Arguments Value Author(s) See Also Examples

Description

For any given internal node in a phylogeny, this function returns the sister clade

Usage

1
sister(phy, node, type = "terminal")

Arguments

phy

an object of class phylo.

node

an integer giving the number of the node.

type

a character string, may be "terminal", "internal", "both", or any unambiguous abbreviation of these.

Value

A vector containing node numbers.

Author(s)

Christoph Heibl

See Also

descendants, noi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# data
# ----
data(vipera)
node <- noi(vipera.ml, c("Vipera_latastei", "Vipera_aspis"))

# get the sister node of 'node'
# -----------------------------
(sn <- sister(vipera.ml, node, type = "internal"))

# ... and the sister nodes's tips (i.e. the sister clade)
# -------------------------------------------------------
(sc <- sister(vipera.ml, node, type = "terminal"))

# results graphically:
# --------------------
plot(vipera.ml)
nodelabels(text = "15", node = 15, frame = NULL, col = "white", bg = "black")
nodelabels(text = sn, node = sn, col = "black", bg = "red")
#append2tiplabel(tree, tips = sc, pch = 21, offset = strwidth("."))

fmichonneau/phyloch documentation built on May 16, 2019, 1:45 p.m.