toTrialDuration {rxode2et}R Documentation

Convert event data to trial duration data A helper function to create a custom event table. The observation time will start from the first event time (baseline) and end at trial duration. The interval is the spacing between each observation.

Description

Convert event data to trial duration data A helper function to create a custom event table. The observation time will start from the first event time (baseline) and end at trial duration. The interval is the spacing between each observation.

Usage

toTrialDuration(ev, trialEnd, interval, writeDir = NULL)

Arguments

ev

event data

trialEnd

extend trial duration. Must be same time unit as event data

interval

observation interval. Must be same time unit as event data

writeDir

if not NULL, write the output to a csv file

Author(s)

Omar Elashkar

Examples

 # Create event table with unique time for each ID
 ev = et(data.frame(id = rep(1:10, 3),  time = runif(min = 10, max = 20, n = 30)))

 # select the duration and spacing interval (assuming time is in years)
 toTrialDuration(ev, trialEnd = 1.5, interval = 0.2)


[Package rxode2et version 2.0.12 Index]