ev_rx {mrgsolve} | R Documentation |
Create intervention objects from Rx input
Description
See details below for Rx specification. Actual parsing is done
by parse_rx()
; this function can be used to debug Rx inputs.
Usage
ev_rx(x, y, ...)
## S4 method for signature 'mrgmod,character'
ev_rx(x, y, ...)
## S4 method for signature 'character,missing'
ev_rx(x, df = FALSE, ...)
parse_rx(x)
Arguments
x |
a model object or |
y |
|
... |
not used at this time. |
df |
if |
Value
The method dispatched on model object (mrgmod
) returns another
model object. The character
method returns an event object. The
parse_rx
function return a list named with arguments for the event
object constructor ev()
.
Rx specification
The dose is found at the start of the string by sequential digits; this may be integer, decimal, or specified in scientific notation
Use
in
to identify the dosing compartment number; must be integerUse
q
to identify the dosing interval; must be integer or decimal number (but not scientific notation)Use
over
to indicate an infusion and its duration; integer or decimal numberUse
x
to indicate total number of doses; must be integerUse
then
or,
to separate dosing periodsUse
after
to insert a lag in the start of a period; integer or decimal number (but not scientific notation)Use
&
to implement multiple doses at the same time
Examples
# example("ev_rx")
ev_rx("100")
ev_rx("100 in 2")
ev_rx("100 q12 x 3")
ev_rx("100 over 2")
ev_rx("100 q 24 x 3 then 50 q12 x 2")
ev_rx("100 then 50 q 24 after 12")
ev_rx("100.2E-2 q4")
ev_rx("100 over 2.23")
ev_rx("100 q 12 x 3")
ev_rx("100 in 1 & 200 in 2")
parse_rx("100 mg q 24 then 200 mg q12")