divide_probs_by_number_of_options_txt: Divide each type of event by its frequency

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

View source: R/BioGeoBEARS_basics_v1.R

Description

In a speciation/cladogenesis matrix, the conditional probabilities of each row must sum to 1. This function sums the number of events of each category and scales them accordingly.

Usage

1

Arguments

probmat

A character matrix of probabilities in the form of formulas, not normalized by the sum of each row.

Details

This function returns the strings, which can then be processed in other functions by e.g. find/replace or eval.

Value

probmat A matrix of strings, where each cell contains the parameters describing the conditional probability of that ancestor–>(Left descendant,Right descendant) range inheritance scenario.

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

make_relprob_matrix_bi, divide_probs_by_number_of_options_nums

Examples

1
2
3
4
5
6
testval=1
probmat = make_relprob_matrix_bi()
probmat

probmat2 = divide_probs_by_number_of_options_txt(probmat)
probmat2

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

Search within the BioGeoBEARS package
Search all R packages, documentation and source code