metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
GNU General Public License v2.0
131 stars 36 forks source link

as_data_set handles uc data sets incorrectly #1115

Closed kylebaron closed 4 months ago

kylebaron commented 1 year ago
library(mrgsolve)
#> 
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#> 
#>     filter
as_data_set(
  ev_rep(evd(amt = 100), ID = 1:3), 
  ev_rep(evd(amt = 200), ID = 1:2)
)
#> Warning: missing values in some columns
#>         ID time cmt evid amt TIME AMT CMT EVID
#> 1...1    1    0   1    1 100   NA  NA  NA   NA
#> 1.1...2  2    0   1    1 100   NA  NA  NA   NA
#> 1.2      3    0   1    1 100   NA  NA  NA   NA
#> 1...4    4    0   0    0   0    0 200   1    1
#> 1.1...5  5    0   0    0   0    0 200   1    1

Created on 2023-09-21 with reprex v2.0.2

kylebaron commented 6 months ago
library(mrgsolve)
#> 
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#> 
#>     filter

as_data_set(
  ev_rep(evd(amt = 100), ID = 1:3), 
  ev_rep(evd(amt = 200), ID = 1:2)
)
#>   ID AMT CMT EVID TIME
#> 1  1 100   1    1    0
#> 2  2 100   1    1    0
#> 3  3 100   1    1    0
#> 4  4 200   1    1    0
#> 5  5 200   1    1    0

Created on 2024-05-25 with reprex v2.0.2