color.tips.by.element: Color the tip labels of a tree according to elements of the...

View source: R/color.tips.by.element.R

color.tips.by.elementR Documentation

Color the tip labels of a tree according to elements of the tip labels

Description

Takes a tree with tip labels structured in a consistent manner, and colors according to unique elements

Usage

color.tips.by.element(tr, element = 6, delim = "|", fixed = TRUE, whiteOut = "NA", addLegend = T,
colorIt = FALSE, byLabels = TRUE, tip.cex = 0.1, dot.pch = 1, blank.tips = T, ...)

Arguments

tr

a phylo object

element

which element of the delimited labels to use for coloring

delim

label delimters

fixed

boolean: should strsplit use fixed = TRUE or not

whiteOut

a character vector identifying labels that should be whited out; defaults to NA

addLegend

boolean

colorIt

boolean: if TRUE, colored dots are added at the tips

byLabels

boolean: if TRUE, tip labels are reassigned the label element, and colored

tip.cex

cex for tip labels

dot.pch

character code for colorIt option

blank.tips

boolean: if TRUE, tip labels are not plotted

...

additional arguments to plot.phylo

Details

The default assumes tips are pipe-delimited. If tips are species|country|subcountry|collectorNumber, for example, use element = 2 to color by country.

Value

the plot.phylo value, returned invisibly

Author(s)

Andrew Hipp

See Also

section.coloring label.elements


andrew-hipp/morton documentation built on April 7, 2024, 12:15 p.m.