From 35b51d6a94b75d276db2ea1f35c895fdc320a70e Mon Sep 17 00:00:00 2001 From: "patrick.lambert" <patrick.mh.lambert@inrae.fr> Date: Mon, 26 Apr 2021 18:07:28 +0200 Subject: [PATCH] thermal range --- exploration/GR3D_Rdescription/thermalRanges.R | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 exploration/GR3D_Rdescription/thermalRanges.R diff --git a/exploration/GR3D_Rdescription/thermalRanges.R b/exploration/GR3D_Rdescription/thermalRanges.R new file mode 100644 index 0000000..cf5d758 --- /dev/null +++ b/exploration/GR3D_Rdescription/thermalRanges.R @@ -0,0 +1,17 @@ +library(tidyverse) + +#TODO extract from xml + +thermalRange = tibble(process = "Grow", Tmin = 1.7, Topt = 4.5, Tmax = 27.9, type = "Rosso") %>% + bind_rows(tibble(process = "SurvivalSpawnerInRiv", Tmin = 5.4, Topt = 16.7, Tmax = 27.5, type = "Rosso") ) %>% + bind_rows(tibble(process = "Reproduction", Tmin = 5.1, Topt = 13.5, Tmax = 24.5, type = "Rosso") ) %>% + bind_rows(tibble(process = "SurviveAfterReproduction", Tmin = -Inf, Topt = 19.58 - log(19)/0.58, Tmax = 19.58 + log(19)/0.58, type = "logit") ) + + +thermalRange %>% mutate(numero = row_number(), + process = factor(process, + levels = c("Grow","SurvivalSpawnerInRiv", "SurviveAfterReproduction", "Reproduction" ))) %>% + ggplot() + + geom_segment(aes(x = Tmin, y = process, xend = Tmax, yend = process)) + + geom_point(aes(x = Topt, y = process)) + -- GitLab