From 396ba6c42252426a132be56b9f417786a1f276e3 Mon Sep 17 00:00:00 2001 From: Ranke Johannes Date: Tue, 13 Aug 2024 10:58:16 +0200 Subject: Support units in drift, runoff und sediment PECs --- inst/data_generation/PEC_sw_exposit.R | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'inst/data_generation') 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")) -- cgit v1.2.1