f_to_event_table_wf_v2: ata transformation: Wide format -> Event format required for...

Description Usage Arguments Value Examples

View source: R/f_01_to_event_table_wf_v2.r

Description

This function organize an input data set wf (wide format) to ef(event format), same as f_to_event_table_wf_all but with the start, stop and outcome from the formula

Usage

1
f_to_event_table_wf_v2(id, start, stop, outcome, data, times, doses, covars)

Arguments

id

name of variable containing the names of subjects

start

names of the variable containing the start time

stop

names of the variable containing the stop time

outcome

name of the variable containing the outcome

data

input data set - wide format data set

times

sub data set of times relatives to doses

doses

sub data set of grouped doses

covars

sub data set of the covars that will be involved in the model

Value

The data set with the event-row format, including the event of exit of the cohort

Examples

1
2
3
 f_to_event_table_wf_v2(id='patientids',start='entry_age',stop='exit_age',
                              outcome='leukaemia',data,times=data[,11:30],doses=data[,31:50],
                              covars=data[,c('sex','country','birthcohort')])

rERR documentation built on May 2, 2019, 11:10 a.m.