
Split a wide dataframe containing static and dynamic covariates and splits in into a dataframe with the static covariates and a list of dataframes, each associated to a dynamic covariate.
Source:R/landmarking_split_wide_df.R
split_wide_df.Rd
Split a wide dataframe containing static and dynamic covariates and splits in into a dataframe with the static covariates and a list of dataframes, each associated to a dynamic covariate.
Arguments
- df
A dataframe in wide format.
- ids
The name of the column that identifies individuals in
df
.- times
The name of the column that identifies measurement times in
df
.- static
A vector with the column names in
df
that store static covariates.- dynamic
A vector with the column names in
df
that store dynamic covariates.- measurement_name
The name for the columns where values of dynamic covariates will be stored.