Description Usage Arguments Value Author(s) Examples
Bootstrapping to simulate trees and obtain expected LTT plot given a model and its parameter values.
1 | expectedLTT(pars, ct=15, model, n_it= 100,color="blue",g=ggplot(),all_trees=TRUE)
|
pars |
Parameters of the diversification rates. |
ct |
Age of the clade |
model |
Species Miversification Model |
n_it |
Number of simulated trees |
color |
Color of the lines of the ltt plot |
g |
Plot to use to add new simulations |
all_trees |
True if want to add all trees ltt plots. False if only want to add the expected ltt plot |
g |
A plot with the expected values. ggplot class. |
F. Richter M.
1 2 3 4 5 6 7 8 9 10 | #clade = "Caviidae"
#brts = get(paste0("brts_",clade))
#pars = as.numeric(DD_est[DD_est$clade==clade,5:7])
#mc = emphasis(brts,model="rpd5c",init_par=c(pars,0),soc=2,sample_size=200,parallel=T)
g = ggplot() + geom_line(data=data.frame(time=-input$brts,n=1:(length(input$brts))),aes(x=time,y=n) )
g1 = expectedLTT(mc$pars,ct=input$brts[1],model = "rpd5c",n_it = 100,color = "Darkgreen",g=g,all_trees = F)
g2 = expectedLTT(as.numeric(DD_est[2,5:7]),ct=input$brts[1],model = "rpd1",n_it = 100,color = "blue",g=g1,all_trees = F)
g2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.