FelicienLL / mapbayr

Easy Maximum A Posteriori Bayesian Estimation of PK parameters in R.
21 stars 2 forks source link

Proper tests `mapbayr_plot()` #201

Closed FelicienLL closed 1 year ago

LauraMvn commented 1 year ago

Error happens when trying to plot some estimation object containing no observation rows :

library(mapbayr)
mod <- exmodel(1, F)
dat <- exdata()
dat <- dat[dat$evid==1,]
est <- mapbayest(mod, dat)
#> Reset with new initial values: -0.033811 -0.045215 0.110378
plot(est)
#> Warning: Unknown or uninitialised column: `time`.
#> Warning in min(x$time): aucun argument trouvé pour min ; Inf est renvoyé
#> Warning: Unknown or uninitialised column: `time`.
#> Warning in max(x$time): aucun argument pour max ; -Inf est renvoyé
#> Error in `pmap()`:
#> ℹ In index: 1.
#> ℹ With name: 1.
#> Caused by error:
#> ! could not find ID column in data set

Created on 2023-05-23 with reprex v2.0.2

FelicienLL commented 1 year ago

deal with missing observation data in general