nlmixr2 / nlmixr2plot

Plotting support for nlmixr2
https://nlmixr2.github.io/nlmixr2plot/
GNU General Public License v3.0
2 stars 0 forks source link

Plotting models without compartments fails #33

Open billdenney opened 1 year ago

billdenney commented 1 year ago

The model below, mod_current is similar to the model in nlmixr2/rxode2ll#6.

> p_mod_current <- plot(mod_current)
Error in `$<-.data.frame`(`*tmp*`, "CMT", value = 1L) : 
  replacement has 1 row, data has 0
> traceback()
6: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", 
       "replacement has %d rows, data has %d"), N, nrows), domain = NA)
5: `$<-.data.frame`(`*tmp*`, "CMT", value = structure(1L, levels = "All Data", class = "factor"))
4: `$<-`(`*tmp*`, "CMT", value = structure(1L, levels = "All Data", class = "factor"))
3: .setupPlotData(x)
2: plot.nlmixr2FitData(mod_current)
1: plot(mod_current)