# \donttest{
if(require(pspline)){
data(Balaenopteridae)
tot_time<-max(node.age(Balaenopteridae)$ages)
data(InfTemp)
dof<-smooth.spline(InfTemp[,1], InfTemp[,2])$df
# Fit the pure birth model (no extinction) with exponential variation of the speciation rate
# with temperature.
f.lamb <-function(t,x,y){y[1] * exp(y[2] * x)}
f.mu<-function(t,x,y){0}
lamb_par<-c(0.10, 0.01)
mu_par<-c()
#result <- fit_env(Balaenopteridae,InfTemp,tot_time,f.lamb,f.mu,
# lamb_par,mu_par,f=1, fix.mu=TRUE, df=dof, dt=1e-3)
# plot fitted rates
#plot_fit_env(result, InfTemp, tot_time)
}
# }
Run the code above in your browser using DataLab