Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/BioGeoBEARS_simulate_v1.R
Given a table with the rows representing nodes, and the
columns representing the relative probabilities of each
state, this function finds the ML (maximum likelihood)
state(s) for each node;
get_ML_state_indices
does this for a row,
get_ML_states
iterates over all the rows.
1 2 | get_ML_state_indices(relprobs_row, nums, maxprob,
if_ties = "takefirst")
|
relprobs_row |
A row from a |
nums |
Numbers indexing the states from 1 to numstates |
maxprob |
The value of the maximum probability for the row. |
if_ties |
What to do with ties. Currently, the only option is to take the first (this will be shown in e.g. a pie chart, of course). |
index_of_ML_state_s
Go BEARS!
Nicholas J. Matzke matzke@berkeley.edu
http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/
Matzke_2012_IBS
1 | testval=1
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.