Learn R Programming

BioGeoBEARS (version 0.2.1)

getname: Collapse range abbreviations to strings

Description

This is a utility function used by apply in tipranges_to_area_strings. It extracts the present areas and concatenates the abbreviations for one row.

Usage

getname(TFrow, tiparea_names, concat = TRUE, sep = "")

Arguments

TFrow
A list of TRUE and FALSE
tiparea_names
The names of each area
concat
If TRUE (default), merge the areas in a state into a single string.
sep
The sep argument for paste.

Value

tiparea A string.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

states_list_indexes_to_areastxt, order_tipranges_by_tree_tips, define_tipranges_object, save_tipranges_to_LagrangePHYLIP

Examples

Run this code
getname(TFrow=c(FALSE, TRUE, TRUE, FALSE),
tiparea_names=c("K", "O", "M", "H"), sep="")
getname(TFrow=c(FALSE, TRUE, TRUE, FALSE),
tiparea_names=c("K", "O", "M", "H"), sep="_")

Run the code above in your browser using DataLab