expand_addl_ii: Expand rows in case ADDL and II variables are present

View source: R/expand_addl_ii.r

expand_addl_iiR Documentation

Expand rows in case ADDL and II variables are present

Description

This function expands ADDL and II records. This is done by placing each ADDL record on a separate line. This is convenient in case of individual dose calculations

Usage

expand_addl_ii(data, evid = NULL, del_iiaddl = TRUE)

Arguments

data

data frame to perform the expansion on

evid

character identifying the event ID (EVID) within the data frame This is used to distinguish observations from dosing records, e.g. 0 for observations

del_iiaddl

logical identifying if the ADDL and II variables can be deleted from output

Details

The function expects that certain variables are present in the data (at least ID, TIME, ADDL and II)

Value

a data frame with expanded dose records

Author(s)

Richard Hooijmaijers

Examples


dfrm <- data.frame(ID=c(1,1), TIME=c(0,12),II=c(12,0),ADDL=c(5,0),AMT=c(10,0),EVID=c(1,0))
expand_addl_ii(dfrm,evid="EVID")

amp.dm documentation built on March 13, 2026, 5:08 p.m.