library(purrr)
library(furrr)
library(tidyr)
library(dplyr)
example_df <- water_df %>%
define_water_chain() %>%
mutate(
target_ph = 10,
chemical = rep(c("naoh", "mgoh2"), 6)
) %>%
solvedose_ph_once(input_water = "defined_water")
example_df <- water_df %>%
define_water_chain() %>%
solvedose_ph_once(input_water = "defined_water", target_ph = 8.8, chemical = "naoh")
example_df <- water_df %>%
define_water_chain() %>%
mutate(target_ph = seq(9, 10.1, .1)) %>%
solvedose_ph_once(chemical = "naoh")
# \donttest{
# Initialize parallel processing
plan(multisession, workers = 2) # Remove the workers argument to use all available compute
example_df <- water_df %>%
define_water_chain() %>%
mutate(target_ph = seq(9, 10.1, .1)) %>%
solvedose_ph_once(chemical = "naoh")
# Optional: explicitly close multisession processing
plan(sequential)
# }
Run the code above in your browser using DataLab