View source: R/make_OCC_every_dose.R
make_OCC_every_dose | R Documentation |
Creates and OCC column that increments in accordance to specified condition.
To be used in a dplyr::mutate()
statement dplyr::group_by()
'd by "ID".
make_OCC_every_dose(d, dose_trigger, new_OCC_trigger)
d |
A data.frame. NONMEM ready input dataset. |
dose_trigger |
Logical expression for defining a dosing row. |
new_OCC_trigger |
Logical expression for defining when OCC should increment. |
# create example object m1 from package demo files exdir <- system.file("extdata", "examples", "theopp", package = "NMproject") m1 <- new_nm(run_id = "m1", based_on = file.path(exdir, "Models", "ADVAN2.mod"), data_path = file.path(exdir, "SourceData", "THEOPP.csv")) d <- input_data(m1) ## OCC increments on every dosing interval with more than 4 samples d %>% make_OCC_every_dose(!is.na(AMT), any(!is.na(DV)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.