Description Usage Arguments Details Value Author(s) References Examples
View source: R/diversity_through_time.R
This function calculates the the number of colonization, speciation, extinction, and emmigration events through the trajectory of island evolution. This results in the total diversity of endemics and non-endemics at each moment in time.
1 2 3 | diversity_through_time(Elevation, Topography, Area, Vs, S0, E0, Ms, Iso_t,
Imm, C0, Ana, Emi, Z, Ma, Msa, DivDep = TRUE, TargetEffect = FALSE,
EnvirFilt = FALSE)
|
Elevation |
Vector of island elevation through time |
Topography |
Vector of island topography through time |
Area |
Vector of island area through time |
Vs |
Probability of a vicariance event when topography equals 1 |
S0 |
The per species probability of adaptive speciation at maximum empty niche space |
E0 |
The per-species probability of extinction when richness equals Kmax |
Ms |
Species richness of the mainland source pool |
Iso_t |
A descriptor of island isolation in arbitrary units |
Imm |
The probability of one species arriving from the mainland per time step |
C0 |
The per-species probability of successful colonization at full empty niche space |
Ana |
The per-species probability of anagenesis per time step |
Emi |
Probability of recolonization of the source area per time step |
Z |
The exponent of the species-area relationship between the island and the source area |
Ma |
The realized size of the source area that provides new species |
Msa |
Power exponent controlling the abundance distribution of the source |
DivDep |
TRUE (default) Diversity dependence acting on immigration, extinction and in-situ speciation |
TargetEffect |
FALSE (default) No effect of island area on the immigration probability |
EnvirFilt |
FALSE (default) No effect of island elevation as proxy for habitat diversity on the immigration probability |
Using the parameters in Table 1 of Borregard et al. (2016) with the
Island
dataset results in slightly different diversity trajectories
than Borregard's Figure 4a. The example below recreates this figure as closely as possible,
but uses a different size of the source area (Ma) and probability of anagenesis (Ana).
Reasons for the differences could be the manually digitalized properties of the
island itself because Figure S3 (Borregard et al. 2016) containes no y-axis scale.
Moreover, the original R script of Borregard et al. (2016) hard-codes many parameters.
Rates can be plotted in units of events per time (as in Borregard et al. 2016) or in units of events per lineage per time (as in many phylogenetic studies). This largely removes the hump-shaped extinction trajectory.
The output is a dataframe containing diversity and rates per time step.
Richness |
Native species richness |
NonEndemics |
Non-endemic species richness |
Endemics |
Endemic species richness |
Kmax |
Carrying capacity |
EndemicsClado |
Endemic species evolved via in-situ cladogenesis |
EndemicsAna |
Endemic species evolved via in-situ anagenesis |
Immigrants |
Species immigrating at that time step to the island |
NewViaClado |
Species evolved via in-situ cladogenesis at that time step |
NewViaNonadaptClado |
Species evolved via non-adaptive in-situ cladogenesis at that time step |
NewViaAdaptClado |
Species evolved via adaptive in-situ cladogenesis at that time step |
NewViaAna |
Species evolved via in-situ anagenesis at that time step |
Extinctions |
Species going extinct at that time step |
Emigrants |
Species emigrating from the island to the mainland |
Torsten Hauffe
Borregaard, M. K., T. J. Matthews and R. J. Whittaker (2016). The general dynamic model: towards a unified theory of island biogeography? Global Ecology and Biogeography, 25(7), 805-816.
Hauffe, T., D. Delicado, R.S. Etienne and L. Valente (submitted). Lake expansion increases equilibrium diversity via the target effect of island biogeography
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | # Reproduce Figure 4a (Borregaard et al., 2016)
data(Island)
Dtt <- diversity_through_time(Elevation = Island$Elevation,
Topography = Island$Topography,
Area = Island$Area,
Vs = 0.0005,
S0 = 0.0025,
E0 = 0.001,
Ms = 500,
Iso_t = 0.3,
Imm = 0.002,
C0 = 0.5,
Ana = 0.0003,
Emi = 0.0002,
Z = 0.25,
Ma = 200,
Msa = 0.3,
DivDep = TRUE,
TargetEffect = FALSE,
EnvirFilt = FALSE)
ColRich <- rgb(170, 99, 42, maxColorValue = 255)
ColNonEnd <- rgb(249, 195, 91, maxColorValue = 255)
ColEnd <- rgb(191, 11, 189, maxColorValue = 255)
ColEx <- rgb(211, 0, 0, maxColorValue = 255)
ColAna <- rgb(255, 144, 235, maxColorValue = 255)
ColClado <- rgb(64, 197, 253, maxColorValue = 255)
# Diversities
par(las = 1, mar = c(4, 6, 0.1, 0.5))
plot(1:nrow(Dtt), Dtt[, "Kmax"], type = "l", col = "black",
xlim = c(-1, 5000), ylim = c(0, 160),
xaxs = "i", yaxs = "i",
xaxt = "n", xlab = "Time (Ma)",
ylab = "Species")
axis(side = 1, at = c(0, 1000, 2000, 3000, 4000, 5000), labels = c(5, 4, 3, 2, 1, 0))
lines(1:nrow(Dtt), Dtt[, "Richness"], type = "l", col = ColRich)
lines(1:nrow(Dtt), Dtt[, "NonEndemics"], type = "l", col = ColNonEnd)
lines(1:nrow(Dtt), Dtt[, "Endemics"], type = "l", col = ColEnd)
legend("topright",
legend = c("Carrying capacity", "Total species richness", "Non-endemics", "Endemics"),
col = c("black", ColRich, ColNonEnd, ColEnd), lty = 1, bty = "n", cex = 0.7)
# Rates
plot(1:nrow(Dtt), Dtt[, "Immigrants"], type = "l", col = ColNonEnd,
xlim = c(-1, 5000), ylim = c(0, 0.15),
xaxs = "i", yaxs = "i",
xaxt = "n", xlab = "Time (Ma)",
ylab = expression(atop(paste("Rate"), "(events"%.%"time step"^-1*")")))
axis(side = 1, at = c(0, 1000, 2000, 3000, 4000, 5000), labels = c(5, 4, 3, 2, 1, 0))
lines(1:nrow(Dtt), Dtt[, "Extinctions"], col = ColEx)
lines(1:nrow(Dtt), Dtt[, "NewViaAna"], col = ColAna)
lines(1:nrow(Dtt), Dtt[, "NewViaClado"], type = "l", col = ColClado)
legend("topright",
legend = c("Colonization", "Extinction", "Anagenesis", "Cladogenesis"),
col = c(ColNonEnd, ColEx, ColAna, ColClado), lty = 1, bty = "n", cex = 0.7)
# Divide by island richness and multiply by 1000
# to obtain rates in units of events per island species per 1 million years
plot(1:nrow(Dtt), 1000 * Dtt[, "Immigrants"] / Dtt[, "Richness"], type = "l", col = ColNonEnd,
xlim = c(-1, 5000), ylim = c(0, 1.3),
xaxs = "i", yaxs = "i",
xaxt = "n", xlab = "Time (Ma)",
ylab = expression(atop(paste("Rate"), "(events"%.%"species"^-1%.%"my"^-1*")")))
axis(side = 1, at = c(0, 1000, 2000, 3000, 4000, 5000), labels = c(5, 4, 3, 2, 1, 0))
lines(1:nrow(Dtt), 1000 * Dtt[, "Extinctions"] / Dtt[, "Richness"], col = ColEx)
lines(1:nrow(Dtt), 1000 * Dtt[, "NewViaAna"] / Dtt[, "Richness"], col = ColAna)
lines(1:nrow(Dtt), 1000 * Dtt[, "NewViaClado"] / Dtt[, "Richness"], type = "l", col = ColClado)
legend("topright",
legend = c("Colonization", "Extinction", "Anagenesis", "Cladogenesis"),
col = c(ColNonEnd, ColEx, ColAna, ColClado), lty = 1, bty = "n", cex = 0.7)
# Figure 4 of Hauffe et al.
TimeSteps <- 4000
X <- 1:TimeSteps
Island <- 1/( 1+exp(-(0.0001 + 0.004*X[1:3000])) )
Island <- Island - min(Island)
Island <- Island / max(Island)
Island <- Island / 2
Island <- c(Island, Island[length(Island)] + Island[1:1000])
Clado <- 0.00007
DttTar <- diversity_through_time(Elevation = Island,
Topography = Island,
Area = Island,
Vs = 0.9 * Clado,
S0 = 0.1 * Clado,
E0 = 0.00095,
Ms = 300,
Iso_t = 0.3,
Imm = 0.00019,
C0 = 1,
Ana = 0.00034,
Emi = 0,
Z = 0.25,
Ma = 200,
Msa = 0.3,
DivDep = FALSE,
TargetEffect = TRUE,
EnvirFilt = FALSE)
# Plot island ontogeny
plot(X, Island, type = "l",
ylim = c(0, 1), xlim = c(-1, max(X)),
xaxs = "i", yaxs = "i",
xaxt = "n", xlab = "Time (Ma)",
ylab = "Elevation Area Topography (%)")
axis(side = 1, at = c(0, 1000, 2000, 3000, 4000), labels = c(4, 3, 2, 1, 0))
# Diversities
plot(1:nrow(DttTar), DttTar[, "Richness"], type = "l", col = ColRich,
xlim = c(-1, max(X)), ylim = c(0, 80),
xaxs = "i", yaxs = "i",
xaxt = "n", xlab = "Time (Ma)",
ylab = "Species")
axis(side = 1, at = c(0, 1000, 2000, 3000, 4000), labels = c(4, 3, 2, 1, 0))
lines(1:nrow(DttTar), DttTar[, "NonEndemics"], type = "l", col = ColNonEnd)
lines(1:nrow(DttTar), DttTar[, "EndemicsAna"], type = "l", col = ColAna)
lines(1:nrow(DttTar), DttTar[, "EndemicsClado"], type = "l", col = ColClado)
legend("topleft",
legend = c("Total species richness", "Non-endemics",
"Endemics evolved via cladogenesis",
"Endemics via anagenesis"),
col = c(ColRich, ColNonEnd, ColAna, ColClado), lty = 1, bty = "n", cex = 0.7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.