I just spent an inordinate amount of time trying to find the error with my code where I had an extra comma in the call to rxRename, like below. I can take on the task of making the error message clearer or switching to a warning.
@mattfidler, would you prefer this to switch to a warning (something like "empty argument ignored") or keep as an error with a clearer message (something like "empty arguments not allowed")?
library(rxode2)
#> rxode2 2.1.2 using 8 threads (see ?getRxThreads)
#> no cache: create with `rxCreateCache()`
mod1 <- function() {
ini({
# central
KA=2.94E-01
CL=1.86E+01
V2=4.02E+01
# peripheral
Q=1.05E+01
V3=2.97E+02
# effects
Kin=1
Kout=1
EC50=200
})
model({
C2 <- centr/V2
C3 <- peri/V3
d/dt(depot) <- -KA*depot
d/dt(centr) <- KA*depot - CL*C2 - Q*C2 + Q*C3
d/dt(peri) <- Q*C2 - Q*C3
eff(0) <- 1
d/dt(eff) <- Kin - Kout*(1-C2/(EC50+C2))*eff
})
}
rxRename(mod1, foo = eff, )
#> Error in FUN(X[[i]], ...): argument ".quoted" is missing, with no default
I just spent an inordinate amount of time trying to find the error with my code where I had an extra comma in the call to
rxRename
, like below. I can take on the task of making the error message clearer or switching to a warning.@mattfidler, would you prefer this to switch to a warning (something like "empty argument ignored") or keep as an error with a clearer message (something like "empty arguments not allowed")?
Created on 2024-06-11 with reprex v2.1.0