# Example 1: ivbase, 1 compartment disables peripheral terms.
# Bits 1-2 encode no.cmpt; here 00 maps to 1.
invalid_iv <- c(0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1)
validStringbinary(invalid_iv, "ivbase")
# Example 2: oralbase, mm = 0 forces eta.km to 0.
# Bits 12-13 encode rv for oralbase.
invalid_oral <- c(1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1)
validStringbinary(invalid_oral, "oralbase")
# Example 3: custom, mcorr is cleared when there are not enough IIV terms.
simple_config <- list(
route = "bolus",
params = c("eta.vc", "mcorr", "rv"),
param_dependencies = list(),
fixed_params = list(no.cmpt = 1, eta.cl = 1, allometric_scaling = 1)
)
# custom encoding: eta.vc (1 bit), mcorr (1 bit), rv (2 bits)
invalid_custom <- c(0, 1, 1, 1) # eta.vc=0, mcorr=1, rv=4
validStringbinary(invalid_custom, "custom", custom_config = simple_config)
Run the code above in your browser using DataLab