Skip to contents

This function adds a variable, OPDI, to the NIF object that indicates the number of observations per analyte and dosing interval. This field can be helpful to identify dosing intervals across which rich sampling was conducted.

Usage

add_obs_per_dosing_interval(obj)

Arguments

obj

A NIF object.

Value

Result as NIF object.

Examples

add_obs_per_dosing_interval(examplinib_poc_nif)
#> # A tibble: 7,622 × 32
#> # Groups:   ID, USUBJID, ANALYTE, PARENT, DI [6,472]
#>      REF    ID STUDYID    USUBJID            AGE   SEX RACE  HEIGHT WEIGHT   BMI
#>    <int> <dbl> <chr>      <chr>            <dbl> <dbl> <fct>  <dbl>  <dbl> <dbl>
#>  1     1     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  2     2     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  3     3     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  4     4     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  5     5     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  6     6     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  7     7     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  8     8     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#>  9     9     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#> 10    10     1 2023000022 202300002210100…    58     1 WHITE   185.   91.4  26.6
#> # ℹ 7,612 more rows
#> # ℹ 22 more variables: DTC <dttm>, TIME <dbl>, NTIME <dbl>, TAFD <dbl>,
#> #   TAD <dbl>, PCELTM <chr>, EVID <dbl>, AMT <dbl>, ANALYTE <chr>, CMT <dbl>,
#> #   PARENT <chr>, TRTDY <dbl>, METABOLITE <lgl>, DOSE <dbl>, MDV <dbl>,
#> #   ACTARMCD <chr>, IMPUTATION <chr>, DI <int>, DV <dbl>, BL_CREAT <dbl>,
#> #   BL_CRCL <dbl>, OPDI <int>
add_obs_per_dosing_interval(examplinib_poc_min_nif)
#> # A tibble: 6,578 × 12
#> # Groups:   ID, PARENT, DI [5,234]
#>      REF    ID  TIME  EVID   AMT   CMT PARENT   MDV    DI  RATE    DV  OPDI
#>    <int> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>  <dbl> <int> <dbl> <dbl> <int>
#>  1     1     1  0        1   500     1 1          1     1     0 NA        6
#>  2     2     1  0        0     0     2 1          0     1     0  0        6
#>  3     3     1  0        0     0     3 1          0     1     0  0        6
#>  4     4     1  2.17     0     0     2 1          0     1     0  3.38     6
#>  5     5     1  2.17     0     0     3 1          0     1     0  3.45     6
#>  6     6     1  4.63     0     0     2 1          0     1     0  1.48     6
#>  7     7     1  4.63     0     0     3 1          0     1     0 10.8      6
#>  8     8     1 24        1   500     1 1          1     2     0 NA        0
#>  9     9     1 48        1   500     1 1          1     3     0 NA        0
#> 10    10     1 72        1   500     1 1          1     4     0 NA        0
#> # ℹ 6,568 more rows