-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
This package is intended to evaluate model predictions. When coding this package we made the reasonable assumption that all patients would have at least one record with EVID == 0. However, if this is not the case, the package fails with a confusing error message.
The issue is that we create covariates based on records with EVID == 0:
Line 65 in ea8242e
| obs_data <- dplyr::filter(data, .data$EVID == 0) |
If no such record exists, we call PKPDsim::new_covariate anyways, which does not expect to received times as a numeric vector of length 0. The resulting error message is something like this
Error in `purrr::map()`:
ℹ In index: 2909.
Caused by error in `purrr::map()`:
ℹ In index: 1.
ℹ With name: WT.
Caused by error in `tmp[i, ]$incl`:
! $ operator is invalid for atomic vectors
In my opinion, skipping and warning encounters where there are no markers is reasonable. We could also check the data set and stop if this condition is not met for all encounters.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels