From b7b16cb18343a6038b59a3711115bc69c81fb7dd Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:15:20 +0100 Subject: [PATCH 1/2] update packages in lockfile --- renv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renv.lock b/renv.lock index 158e8ba..c65ac9b 100644 --- a/renv.lock +++ b/renv.lock @@ -45,9 +45,9 @@ }, "ape": { "Package": "ape", - "Version": "5.8", + "Version": "5.8-1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "Rcpp", @@ -60,7 +60,7 @@ "stats", "utils" ], - "Hash": "16b5ff4dff0ead9ea955f62f794b1535" + "Hash": "54e5b03e928da23e75dc5bb633648d27" }, "codetools": { "Package": "codetools", From 8d7739d9c859d3eb2e005561105a3439f8e535b0 Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:45:39 +0100 Subject: [PATCH 2/2] expand figure 5 to include recovery probability --- code/examples.R | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/code/examples.R b/code/examples.R index 851948c..4e96592 100644 --- a/code/examples.R +++ b/code/examples.R @@ -75,7 +75,7 @@ dev.off() #### Figure 5 #### # effect of water depth on fossil abundance pdf(file = "figs/fig5.pdf") -par(mfrow = c(1,2)) +par(mfrow = c(2,2)) gc = approxfun(scenarioA$t_myr, scenarioA$wd_m[,"12km"]) niche = snd_niche(opt = 100, tol = 30, cutoff_val = 0) # define niche with optimum at 100 m plot(scenarioA$t_myr, gc(scenarioA$t_myr), @@ -85,6 +85,24 @@ plot(scenarioA$t_myr, gc(scenarioA$t_myr), ylab = "Water depth [m]", main = "Water Depth on the Proximal Slope") +plot(x = scenarioA$t_myr, + y = niche(gc(scenarioA$t_myr)), + type = "l", + lwd = 3, + xlab = "Time [Myr]", + ylab = "Recovery probability", + main = "Niche in Time Domain") + +r = list(t = scenarioA$t_myr, y = niche(gc(scenarioA$t_myr))) |> time_to_strat(adm12) + +plot(x = r$h[!is.na(r$h)], + y = r$y[!is.na(r$h)], + type = "l", + lwd = 3, + xlab = "Stratigraphic position [m]", + ylab = "Recovery probability", + main = "Niche in Stratigraphic Domain") + p3(rate = rolo, min_time(adm12), max_time(adm12)) |> apply_niche(niche, gc) |> time_to_strat(adm12, destructive = TRUE) |>