as.ev: Coerce an object to class ev

as.evR Documentation

Coerce an object to class ev

Description

Use this function to convert a data frame to an event object.

Usage

as.ev(x, ...)

## S4 method for signature 'data.frame'
as.ev(x, keep_id = TRUE, clean = FALSE, ...)

## S4 method for signature 'ev'
as.ev(x, ...)

Arguments

x

an object to coerce.

...

not used.

keep_id

if TRUE, ID column is retained if it exists.

clean

if TRUE, only dosing or ID information is retained in the result.

Details

If CMT (or cmt) is missing from the input, it will be set to 1 in the event object.

If TIME (or time) is missing from the input, it will be set to 0 in the event object.

If EVID (or evid) is missing from the input, it will be set to 1 in the event object.

Value

An object with class ev.

Examples

data <- data.frame(AMT = 100) 

as.ev(data)

as.ev(data, clean = TRUE)


mrgsolve documentation built on Oct. 18, 2024, 5:12 p.m.

Related to as.ev in mrgsolve...