Standardize the input dataframe
standardize.df0.Rdstandardize.df0 does the following:
remaps IDs to consecutive integers
sorts the dataframe by ID and time
replaces categorical variables that have more than two levels with dummy indicators
Arguments
- df0
The original input dataframe
- id
Quoted column name from df0 containing subject ids
- t
Quoted column name from df0 containing the time variable
- from
Quoted column name from df0 containing the "from" state for the event in that row
- to
Quoted column name from df0 containing the "to" state for the event in that row
- i.covlist
A character vector containing quoted column names from df0 for categorical covariates
- c.covlist
A character vector containing quoted column names from df0 for continuous covariates