Faster utility function for converting wide-format
data.frame into a long format.
Internally uses data.table package functions
Keeps all covariates that appear only once and at the first time-point constant (carry-forward).
All covariates that appear fewer than range(t) times are imputed with NA for missing time-points.
Observations with all NA's for all time-varying covariates are removed.
When removing NA's the time-varying covariates that are attributes (attnames) are not considered.
data.frame in long format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.