metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
129 stars 36 forks source link

data_set column drop is not reported when item is recovered #1184

Closed kylebaron closed 3 months ago

kylebaron commented 5 months ago
  1. You do get the message when you don't recover
  2. You don't get the message when you do recover
  3. It should be a warning or an error anyway
library(mrgsolve)
#> 
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#> 
#>     filter

mod <- house(end = 0)

data <- expand.ev(amt = 100, WTVC = "a")

mrgsim(mod, data)
#> [data-set] dropped column: WTVC (character)
#> Model:  housemodel 
#> Dim:    2 x 7 
#> Time:   0 to 0 
#> ID:     1 
#>     ID time GUT CENT RESP DV CP
#> 1:   1    0   0    0   50  0  0
#> 2:   1    0 100    0   50  0  0

mrgsim(mod, data, recover = "WTVC")
#> Model:  housemodel 
#> Dim:    2 x 8 
#> Time:   0 to 0 
#> ID:     1 
#>     ID time GUT CENT RESP DV CP WTVC
#> 1:   1    0   0    0   50  0  0    a
#> 2:   1    0 100    0   50  0  0    a

Created on 2024-04-06 with reprex v2.0.2