plot.fit_t.env {RPANDA}R Documentation

Plot the phenotypic evolutionary rate through time estimated by the fit_t_env function

Description

Plot estimated evolutionary rate as a function of the environmental data and time.

Usage


## S3 method for class 'fit_t.env'
plot(x, steps = 100, ...)

Arguments

x

an object of class 'fit_t.env' obtained from a fit_t_env fit.

steps

the number of steps from the root to the present used to compute the evolutionary rate \sigma2 through time.

...

further arguments to be passed to plot. See ?plot.

Value

plot.fit_t.env returns invisibly a list with the following components used in the current plot:

time_steps

the times steps where the climatic function was evaluated to compute the rate. The number of steps is controlled through the argument steps.

rates

the estimated evolutionary rate through time estimated at each time_steps

Note

All the graphical parameters (see par) can be passed through (e.g. line type: lty, line width: lwd, color: col ...)

Author(s)

J. Clavel

References

Clavel, J. & Morlon, H., 2017. Accelerated body size evolution during cold climatic periods in the Cenozoic. Proceedings of the National Academy of Science, 114(16): 4183-4188.

See Also

lines.fit_t.env, likelihood_t_env

Examples


if(test){
data(Cetacea)
data(InfTemp)

# Simulate a trait with temperature dependence on the Cetacean tree
set.seed(123)


trait <- sim_t_env(Cetacea, param=c(0.1,0.2), env_data=InfTemp, model="EnvExp", 
					root.value=0, step=0.01, plot=TRUE)


## Fit the Environmental-exponential model

result1=fit_t_env(Cetacea, trait, env_data=InfTemp, scale=TRUE)
plot(result1)

# further options
plot(result1, lty=2, lwd=2, col="red")

}


[Package RPANDA version 2.3 Index]