given_a_starting_state_simulate_split: Given the state just below a node, simulate the states after...

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

View source: R/BioGeoBEARS_simulate_v1.R

Description

This function simulates a biogeographical history during a speciation/cladogenesis range inheritance event, given a cladogenesis probability transition matrix and a starting state.

Usage

1
2
  given_a_starting_state_simulate_split(index_Qmat_0based_of_starting_state = 1,
    COO_probs_columnar, numstates)

Arguments

index_Qmat_0based_of_starting_state

An integer index value, between 0 and (numstates-1), which specifies what state is the starting point for the branch.

COO_probs_columnar

A speciation/cladogenesis transition matrix, in COO-like form, as produced by rcpp_calc_anclikes_sp_COOweights_faster.

numstates

The number of states/geographic ranges.

Value

split_desc 0-based indices of the descendant states in the two daughters.

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

Matzke_Maguire_2011_SVP

See Also

rcpp_calc_anclikes_sp_COOweights_faster, rcpp_calc_rowsums_for_COOweights_columnar

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.