expand_addl | R Documentation |
expand rows that correspond to addl records
expand_addl(.df, ii_scale = 3600, time_related_cols = NULL)
.df |
dataframe to process |
ii_scale |
scaling factor to expand addl columns by. Defaults to 3600 |
time_related_cols |
column name and scaling factor for time-dependent columns |
scaling factor needed to figure out units to increment the time column by, based on the TIME column. Given time in date-time format, default unit of incrementation is seconds, so the ii_scale should be 3600 for II given in hours.
Given a Time in hours and II in hours, the ii_scale would be 1.
time_related_cols should be a named vector, where the name corresponds to the column and the value is the scaling factor to scale the increment column by. Eg, given II records in days and an additional column AGEYRS, while expanding addl records, this must also be appropriately incremented in year increments. In the case of having a TIME variable in days, the time_related_cols value represents the scaling factor so time_related_cols = c("AGEYRS" = 1/365)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.