library(purrr)
library(furrr)
library(tidyr)
library(dplyr)
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
chemdose_ph_once(input_water = "balanced_water", naoh = 5)
example_df <- water_df %>%
define_water_chain() %>%
balance_ions_chain() %>%
mutate(
hcl = seq(1, 12, 1),
naoh = 20
) %>%
chemdose_ph_once(input_water = "balanced_water", mgoh2 = 55, co2 = 4)
# 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() %>%
chemdose_ph_once(input_water = "balanced_water", naoh = 5)
# Optional: explicitly close multisession processing
plan(sequential)
Run the code above in your browser using DataLab