formatNum
updated 2016-12-18
Prettifies numbers, especially for plotting
round_meancalculates mean and rounds to a number of digits. Returns a double.round_stdcalculates standard deviation and rounds to a number of digits. Returns a double.round_exactrounds value to a number of digits, preserving trailing zeros. Returns a string.percentconverts a ratio to a percentage with a number of digits and a percent sign, e.g. 0.125 –> “12.5%”