breakpoint <- define_water(7.5, 20, 65, free_chlorine = 5, tot_nh3 = 1) %>%
chemdose_chloramine(time = 40, cl2 = 2, nh3 = 1, use_free_cl_slot = TRUE)
library(dplyr)
breakpoint <- water_df %>%
mutate(free_chlorine = 5, tot_nh3 = 1) %>%
slice_head(n = 3) %>%
define_water_chain() %>%
mutate(
time = 8,
cl2dose = c(2, 3, 4)
) %>%
chemdose_chloramine_chain(
input_water = "defined_water",
cl2 = cl2dose,
use_free_cl_slot = TRUE,
use_tot_nh3_slot = TRUE
)
# \donttest{
# Initialize parallel processing
library(furrr)
# plan(multisession)
example_df <- water_df %>%
define_water_chain() %>%
chemdose_chloramine_chain(
input_water = "defined_water", cl2 = c(2, 4), nh3 = 2, time = 8
)
# Optional: explicitly close multisession processing
# plan(sequential)
# }
Run the code above in your browser using DataLab