Open-Systems-Pharmacology / OSPSuite.RUtils

Utility functions for Open Systems Pharmacology R packages
https://www.open-systems-pharmacology.org/OSPSuite.RUtils/dev/
GNU General Public License v2.0
1 stars 3 forks source link

printline function ignores format settings when printing numeric values #120

Closed Yuri05 closed 1 year ago

Yuri05 commented 2 years ago

I think the error is in the printline function of ospsuite.utils:

https://github.com/Open-Systems-Pharmacology/OSPSuite.RUtils/blob/409d2382eb49f04e9e332a126452b89b0cc2a6e5/R/printable.R#L40-L42

It just prints the value via cat. But it should check first if the value is numeric and e.g. convert it to string using the formatfunction. Then the output would be as expected.

> format(dataSet$LLOQ)
[1] "1"

Originally posted by @Yuri05 in https://github.com/Open-Systems-Pharmacology/OSPSuite-R/issues/1123#issuecomment-1249565191