binary_range_to_letter_code_list: Convert binary presence/absence codes (1/0) to a list of text...

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

View source: R/BioGeoBEARS_basics_v1.R

Description

Given a row of a tipranges object, converts to a list of the corresponding name(s). E.g., if the areas were (A,B,C,D), and the tipranges row had (1 0 1 0), the output statename would be ("A","C").

Usage

1
2
  binary_range_to_letter_code_list(tipranges_row,
    areanames)

Arguments

tipranges_row

row of a tipranges object.

areanames

a list of the names of the areas

Value

list_of_areas_in_the_state A list of the name(s) of the areas corresponding to the presence/absence coding in the row

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

binary_ranges_to_letter_codes, letter_string_to_binary, letter_strings_to_tipranges_df, binary_range_to_letter_code_txt, tipranges_to_tip_condlikes_of_data_on_each_state

Examples

1
2
3
4
5
6
testval=1
tipranges_row = c(1, 0, 1, 0)
areanames = c("A", "B", "C", "D")
list_of_areas_in_the_state = binary_range_to_letter_code_list(tipranges_row,
areanames)
list_of_areas_in_the_state

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