# NOT RUN {
# Simulation of a tree with a mrca at time 10 in the past,
# under the density-dependent model
numbsim<-10
age<-10
lambda<-0.3
mu<-0.2
K<-40
# You can produce LTT plots as follows.
# (for now this is un-commented, as some combinations of geiger / TreeSim on certain platforms
# produce problems. If this is the case for you, please report to tanjs.stadler@bsse.ethz.ch).
# }
# NOT RUN {
<!-- % tree<- sim.bd.age(age,numbsim,lambda,mu,mrca=TRUE,complete=FALSE,K=K) -->
# }
# NOT RUN {
<!-- % # Plot of tree -->
# }
# NOT RUN {
<!-- % ltttrees<-LTT.plot.gen(list(tree)) -->
# }
# NOT RUN {
<!-- % plot(ltttrees[[1]],type="l") -->
# }
# NOT RUN {
<!-- % #alternatively use LTT.plot() for plotting: -->
# }
# NOT RUN {
<!-- % LTT.plot(list(tree),avg=TRUE) -->
# }
# NOT RUN {
# }
# NOT RUN {
<!-- % # Simulation of a tree with the first lineage at time 10 in the past, -->
# }
# NOT RUN {
<!-- % # under the density-dependent model -->
# }
# NOT RUN {
<!-- % numbsim<-10 -->
# }
# NOT RUN {
<!-- % age<-10 -->
# }
# NOT RUN {
<!-- % lambda<-0.3 -->
# }
# NOT RUN {
<!-- % mu<-0 -->
# }
# NOT RUN {
<!-- % K<-40 -->
# }
# NOT RUN {
<!-- % tree<- sim.bd.age(age,numbsim,lambda,mu,mrca=FALSE,complete=FALSE,K=K) -->
# }
# NOT RUN {
<!-- % # Plot of tree -->
# }
# NOT RUN {
<!-- % ltttrees<-LTT.plot.gen(c(list(tree),list((1:10)*0+age))) -->
# }
# NOT RUN {
<!-- % plot(ltttrees[[5]],type="l") -->
# }
# NOT RUN {
<!-- % #alternatively use LTT.plot() for plotting! -->
# }
Run the code above in your browser using DataLab