Skip to content

Commit

Permalink
Take care of vpcSim objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Aug 15, 2022
1 parent 91a6cab commit 734ad73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/vpcPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ vpcPlot <- function(fit, data = NULL, n = 300, bins = "jenks",
}
}
# Simulate with VPC
.sim <- nlmixr2est::vpcSim(fit, ..., keep=stratify, n=n, pred=pred_corr, seed=seed)
if (inheirts(fit, "nlmixr2vpcSim")) {
.sim <- fit
} else {
.sim <- nlmixr2est::vpcSim(fit, ..., keep=stratify, n=n, pred=pred_corr, seed=seed)
}
.sim <- nlmixr2est::vpcSimExpand(fit, .sim, stratify)
.simCols <- list(
id="id",
Expand Down

0 comments on commit 734ad73

Please sign in to comment.