Learn R Programming

mrgsolve (version 0.8.9)

ev_seq: Schedule a series of event objects

Description

Schedule a series of event objects

Usage

ev_seq(..., id = NULL, .dots = NULL)

# S3 method for ev seq(...)

Arguments

...

event objects or numeric arguments named wait

id

numeric vector of subject ids

.dots

a list of event objects that replaces ...

Value

A single event object.

Details

The doses for the next event line start after all of the doses from the previous event line plus one dosing interval from the previous event line (see examples).

When numerics named wait are mixed in with the event objects, a period with no dosing activity is incorporated into the sequence, between the adjacent dosing event objects. Values for wait can be negative.

Values for time in any event object act like a prefix time spacer wherever that event occurs in the event sequence (see examples).

Use the generic seq when the first argument is an event object. If a waiting period is the first event, you will need to use ev_seq.

Examples

Run this code
# NOT RUN {
e1 <- ev(amt=100, ii=12, addl=1)

e2 <- ev(amt=200)

seq(e1, e2)

seq(e1, wait = 8, e2)

seq(e1, wait = 8, e2, id = 1:10)

ev_seq(wait = 12, e1, wait = 120, e2, wait = 120, e1)

seq(ev(amt=100, ii=12), ev(time=8, amt=200))

# }

Run the code above in your browser using DataLab