TipLabels()
extracts labels from an object: for example, names of taxa in
a phylogenetic tree or data matrix. AllTipLabels()
extracts all labels,
where entries of a list of trees may pertain to different taxa.
Usage
TipLabels(x, single = TRUE)
# Default S3 method
TipLabels(x, single = TRUE)
# S3 method for class 'matrix'
TipLabels(x, single = TRUE)
# S3 method for class 'logical'
TipLabels(x, single = TRUE)
# S3 method for class 'phylo'
TipLabels(x, single = TRUE)
# S3 method for class 'phyDat'
TipLabels(x, single = TRUE)
# S3 method for class 'MixedBase'
TipLabels(x, single = TRUE)
# S3 method for class 'TreeNumber'
TipLabels(x, single = TRUE)
# S3 method for class 'Splits'
TipLabels(x, single = TRUE)
# S3 method for class 'list'
TipLabels(x, single = FALSE)
# S3 method for class 'multiPhylo'
TipLabels(x, single = FALSE)
# S3 method for class 'character'
TipLabels(x, single = TRUE)
# S3 method for class 'numeric'
TipLabels(x, single = TRUE)
# S3 method for class 'phyDat'
TipLabels(x, single = TRUE)
AllTipLabels(x)
# S3 method for class 'list'
AllTipLabels(x)
# S3 method for class 'multiPhylo'
AllTipLabels(x)
# S3 method for class 'phylo'
AllTipLabels(x)
# S3 method for class 'Splits'
AllTipLabels(x)
# S3 method for class 'TreeNumber'
AllTipLabels(x)
# S3 method for class 'matrix'
AllTipLabels(x)
Value
TipLabels()
returns a character vector listing the tip labels
appropriate to x
. If x
is a single integer, this will be a vector
t1
, t2
... tx
, to match the default of rtree()
.
See also
Other tree properties:
ConsensusWithout()
,
MatchEdges()
,
NSplits()
,
NTip()
,
NodeNumbers()
,
PathLengths()
,
SplitsInBinaryTree()
,
TreeIsRooted()
Other Splits operations:
LabelSplits()
,
NSplits()
,
NTip()
,
PolarizeSplits()
,
SplitFrequency()
,
Splits
,
SplitsInBinaryTree()
,
TipsInSplits()
,
match.Splits
,
xor()
Examples
TipLabels(BalancedTree(letters[5:1]))
#> [1] "e" "d" "c" "b" "a"
TipLabels(5)
#> [1] "t1" "t2" "t3" "t4" "t5"
data("Lobo")
head(TipLabels(Lobo.phy))
#> [1] "Tubiluchus_Priapulida" "Cricocosmia" "Aysheaia"
#> [4] "Siberion" "Onychodictyon_ferox" "Onychodictyon_gracilis"
AllTipLabels(c(BalancedTree(4), PectinateTree(8)))
#> [1] "t1" "t2" "t3" "t4" "t5" "t6" "t7" "t8"