divide_probs_by_number_of_options_txt: Divide each type of event by its frequency
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
divide_probs_by_number_of_options_txt(probmat)
Arguments
probmat
A character matrix of probabilities in the
form of formulas, not normalized by the sum of each row.
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.
Details
This function returns the strings, which can then be
processed in other functions by e.g. find/replace or
eval.