View source: R/merge_functions.R
post_process_dosing | R Documentation |
Apply ADDL and Missing doses to a dosing data frame
post_process_dosing(df, expandADDL = F, ADDLTolerance = 0.5,
ADDLgroups = c("ID", "CMT"))
df |
A tbl_df or data.frame object with all of the dosing data |
expandADDL |
A logical indicating if ADDL records should be expanded to individual dosing records |
This routine looks for pertinent columns in df and determines if information is available to apply ADDL imputation, missing dose exclusion and dose splitting. For ADDL imputation it looks for an II column. If the II column is found rows where II>0 indicate the beginning of a repeating dose. A new dose record is injected into the output after the initial dose to specify the additional doses. The additional doses will continue until the next dose, stopping one dosing interval before the next dose.
For dose splitting, SPLIT should contain a numeric value greater than or equal to 0 in each row. The dosing rows will be duplicated the specified number of times. If CMT is given, ".<SPLIT>" will be appended to it (e.g. "1.1", "1.2" or "PARENT.1", "PARENT.2"). IF CMT is not found, it will be created using the name "DOSE", such that the reported value is "DOSE.1" for the first duplicate.
A tbl_df object with the appended data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.