Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/BioGeoBEARS_basics_v1.R
This is a utility function for
symbolic_to_P_matrix
and
symbolic_to_Q_matrix
.
1 2 | symbolic_cell_to_relprob_cell(charcell, cellsplit = "",
mergesym = "*", d = 0.1, e = 0.01, ...)
|
charcell |
The text formula. |
cellsplit |
The symbol to split the formulas on. Default "\\+" (plus symbol, with escape code). |
mergesym |
The symbol to merge the formulas with. Default "+". |
d |
The dispersal/range expansion rate. Default
|
e |
The extinction/range contraction rate. Default
|
... |
Additional arguments to pass to
|
This function can be used in sapply
.
It still will not be very fast compared to the
calculations in cladoRcpp
, but
can be useful for demonstrative purposes.
cellval
The output cell value.
Go BEARS!
Nicholas J. Matzke matzke@berkeley.edu
http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster
Matzke_2012_IBS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | testval=1
charcell = "1*d+1*d"
# Right
cellval = symbolic_cell_to_relprob_cell(charcell, cellsplit="yadda",
mergesym="", d=0.1, e=0.01)
cellval
# Wrong
cellval = symbolic_cell_to_relprob_cell(charcell, cellsplit="\\+",
mergesym="*", d=0.1, e=0.01)
cellval
# Right
cellval = symbolic_cell_to_relprob_cell(charcell, cellsplit="\\+",
mergesym="+", d=0.1, e=0.01)
cellval
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.