Generate event data using longitudinal data, and restrict output to time until the nth event.
genNthEvent(dtName, defEvent, nEvents = 1, perName = "period", id = "id")
name of existing data table
data definition table (created with defDataAdd) that determines the event generating process.
maximum number of events that will be generated (the nth event).
variable name for period field. Defaults to "period"
string representing name of the id field in table specified by dtName
data.table that stops after "nEvents" are reached.