getname: Collapse range abbreviations to strings

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_basics_v1.R

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

1
  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.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

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

1
2
3
4
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="_")

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.