Closed ddalthorp closed 6 years ago
Store calculation results as returned by R (i.e., all digits), but for display of summary statistics in GUI, show only the "desired" number of digits via sprintf.
This is an intricate issue that we should table for the time being.
Do not truncate trailing zeros more than other digits. Unfortunately, this is something R is not great at.
E.g., round(14.12, 1) --> 14.1 round(14.02, 1) --> 14 rather than the desired 14.0
sprintf('%.1f', 14.02) --> "14.0", which is just right for printing but must be cast as numeric before using in calculations.