Learn R Programming

BioGeoBEARS (version 0.2.1)

simulated_indexes_to_tipranges_file: Convert simulated Qmat 0-based indexes to a tipranges file

Description

This function takes simulated state indices (ranging from 0 to numstates-1, i.e. number of possible geographic ranges-1) and converts them to a C++-LAGRANGE-style PHYLIP geographic ranges file.

Usage

simulated_indexes_to_tipranges_file(simulated_states_by_node, areas_list, states_list, trfn, out_geogfn = "lagrange_area_data_file.data")

Arguments

simulated_states_by_node
The simulated states/geographic ranges, in 0-based index form, ordered as the tips & nodes are ordered in a pruningwise-ordered phylo object in APE.
areas_list
A list of the desired area names/abbreviations/letters.
states_list
A list of the possible states/geographic ranges, in 0-based index form.
trfn
The filename of the source Newick tree.
out_geogfn
The output filename.

Value

out_geogfn The output filename.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/

Matzke_2012_IBS

ReeSmith2008

SmithRee2010_CPPversion

See Also

define_tipranges_object, getareas_from_tipranges_object, simulated_indexes_to_tipranges_object

Examples

Run this code
testval=1

Run the code above in your browser using DataLab