f_to_event_table_wf_all: Data transformation: Wide format -> Event format required for the model
Description
This function organize an input data set wf (wide format, same input as in Epicrue Peanuts), to the required ef data set for the model.
It appends an index of person event 1,2..n,0 if a subject has n doses (or grouped doses), and being the 0-row the exit conditions: exit time, exit dose and the outcome.
Also creates the cumulated dose.
# NOT RUN {f_to_event_table_wf_all(formula,data,id_name='patientids',doses=data[,31:50],
times=data[,11:30],covars=data[,c('sex','country','birthcohort')])
# }