aboutsummaryrefslogtreecommitdiff
path: root/inst
diff options
context:
space:
mode:
authorRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-13 10:58:16 +0200
committerRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-13 11:00:17 +0200
commit396ba6c42252426a132be56b9f417786a1f276e3 (patch)
treedacbad92ab168e0dfc1b70c6f8c7a3af29243d96 /inst
parent870c7f6315e2656fceea28449bdeb5b2a57adf10 (diff)
Support units in drift, runoff und sediment PECs
Diffstat (limited to 'inst')
-rw-r--r--inst/data_generation/PEC_sw_exposit.R9
1 files changed, 6 insertions, 3 deletions
diff --git a/inst/data_generation/PEC_sw_exposit.R b/inst/data_generation/PEC_sw_exposit.R
index f7d9737..25d603d 100644
--- a/inst/data_generation/PEC_sw_exposit.R
+++ b/inst/data_generation/PEC_sw_exposit.R
@@ -1,4 +1,6 @@
library(here)
+library(units)
+library(tibble)
# Runoff percentages
Koc_breaks <- c(0, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, Inf)
@@ -7,7 +9,8 @@ Koc_classes <- c(tmp[1], paste0(">", tmp[2:11]), ">50000")
perc_runoff_exposit <- data.frame(
Koc_lower_bound = Koc_breaks[1:12],
dissolved = c(0.11, 0.151, 0.197, 0.248, 0.224, 0.184, 0.133, 0.084, 0.037, 0.031, 0.014, 0.001),
- bound = c(0, 0, 0, 0.001, 0.004, 0.020, 0.042, 0.091, 0.159, 0.192, 0.291, 0.451))
+ bound = c(0, 0, 0, 0.001, 0.004, 0.020, 0.042, 0.091, 0.159, 0.192, 0.291, 0.451)) |>
+ mutate(Koc_lower_bound = set_units(Koc_lower_bound, "L/kg"))
rownames(perc_runoff_exposit) <- Koc_classes
# Runoff reduction percentages
@@ -30,5 +33,5 @@ perc_runoff_reduction_exposit <- list(
row.names = c("No buffer", "20 m"))
)
-save(perc_runoff_exposit, perc_runoff_reduction_exposit,
- file = here("data/perc_runoff.RData"))
+save(perc_runoff_exposit, file = here("data/perc_runoff_exposit.RData"))
+save(perc_runoff_reduction_exposit, file = here("data/perc_runoff_reduction_exposit.RData"))

Contact - Imprint