diff --git a/exploration/GR3D_Rdescription/thermalRanges.R b/exploration/GR3D_Rdescription/thermalRanges.R new file mode 100644 index 0000000000000000000000000000000000000000..cf5d758f1293a4138f5a282ba81361ce7fbab178 --- /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)) +