wow, and you didn't even use #rlang! (which would probably be my instinct when trying to implement something like this)

wow, and you didn't even use #rlang! (which would probably be my instinct when trying to implement something like this)
New from the R Consortium’s nlmixr2 Working Group: adaptive dosing in rxode2.
nlmixr2 is an open-source R ecosystem for pharmacometrics and modeling drug behavior and dosing.
See how dosing can adapt during simulation:
r-consortium.org/posts/nlmixr...