simulated_indexes_to_tipranges_object: Convert simulated Qmat 0-based indexes to a tipranges object

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

View source: R/BioGeoBEARS_simulate_v1.R

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 tipranges object. This can then be converted into a C++-LAGRANGE-style PHYLIP geographic ranges file.

Usage

1
2
  simulated_indexes_to_tipranges_object(simulated_states_by_node,
    areas_list, states_list, trfn)

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.

Value

tipranges_object An object of class tipranges.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

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_file

Examples

1
testval=1

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

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