UUPharmacometrics / libsoc

A library for creating, writing and reading PharmML standard output files
GNU Lesser General Public License v3.0
8 stars 2 forks source link

Warnings if reference PharmML not found #3

Open stumoodie opened 6 years ago

stumoodie commented 6 years ago

The SO file can reference a PharmML file that contains the model that the results pertain to. libsoc uses this file to provide additional metadata about parameters in the SO file. However, if the file can't be found then it just omits the metadata. It would be useful if there were diagnostics to tell the user if the the PharmML document cannot be found. At the moment there is no direct and reliable way of knowing.

My suggestion would be to generate a warning when using so_read_SO if the PharmML document could not be found. Additionally it would be nice to have the option to cause the method to fail if it cannot be found:

so_read_so(filename, error_on_waning=TRUE)

To suppress warning then use:

suppressWarnings(so_read_so(filename, error_on_waning=TRUE))