UUPharmacometrics / xpose

Graphical diagnostics for pharmacometric models
https://uupharmacometrics.github.io/xpose
GNU Lesser General Public License v3.0
55 stars 28 forks source link

error in read_nm_models when controlfile contains $PROB #222

Closed AndreasCalvagone closed 9 months ago

AndreasCalvagone commented 10 months ago

Reading a controlstream only (i.e. no lst or ext available), throws an error when the Problem tag in the code is abbreviated as "$PROB".

The issue is in various lines of code that search for a string that starts with $PROB but is longer. suggest to replace stringr::str_detect(model, "^\\s*\\$PROB.+")

with

stringr::str_detect(model, "^\\s*\\$PROB")

bguiastr commented 9 months ago

@AndreasCalvagone thanks for reporting this. I implemented your suggestion in the development version, could you please check that it works on your example and re-open the issue if not?