toTrialDuration | 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.
toTrialDuration(ev, trialEnd, interval, writeDir = NULL)
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 |
Omar Elashkar
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.