library(purrr)
library(furrr)
library(tidyr)
library(dplyr)
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
chemdose_ph_chain(alum = 30) %>%
chemdose_toc_chain(input_water = "dosed_chem_water")
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
mutate(
ferricchloride = seq(1, 12, 1),
coeff = "Ferric"
) %>%
chemdose_toc_chain(input_water = "balanced_water")
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
chemdose_toc_chain(input_water = "balanced_water", alum = 40, coeff = "General Alum")
# Initialize parallel processing
plan(multisession, workers = 2) # Remove the workers argument to use all available compute
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
mutate(ferricchloride = seq(1, 12, 1)) %>%
chemdose_toc_chain(input_water = "balanced_water", coeff = "Ferric")
# Optional: explicitly close multisession processing
plan(sequential)
Run the code above in your browser using DataLab