Description Usage Arguments Details Value Examples
Determine whether to dose during certain cycles.
1 | is_dosing_period(N, init, pattern, first, then_every, cap = Inf)
|
N |
cycles or periods to check. |
init |
Non-repeating dosing indicator at beginning. |
pattern |
Repeating dosing pattern after initial. |
first |
if |
then_every |
if |
cap |
largest dosing period |
init
takes precedence over first
; that is,
if init
is defined, then first
is ignored. Similarly,
pattern
takes precedence over then_every
.
A logical vector indicating whether or not a patient is dosed during the relevant period (markov cycle).
1 2 3 4 5 6 7 8 | is_dosing_period(N = 1:13, first = 4, then_every = 3, cap = 40)
is_dosing_period(N = 37:46, first = 4, then_every = 3, cap = 40)
is_dosing_period(N = 1:100, init = c(1,0,1,0,1,0,1,1), pattern = c(1, 0, 1, 1, 0), cap = 120)
## stop after initial period
is_dosing_period(N = 1:8, first = 4, pattern = 0, cap = 40)
## demonstrating argument precedence rules
is_dosing_period(N = 1:10, init = c(1,0,1), first = 3, then_every = 5)
is_dosing_period(N = 1:10, init = numeric(0), pattern = c(1, 1, 0, 1, 0), then_every = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.