Two significant digits from 0.001 upwards, scientific notation below
(\(4.9 \times 10^{-4}\) after TypesetLabel()) and "n.e." (not evaluable) for
missing or non-finite values. This is the C format %.2g / %.1e of
common figure code.
Value
Character vector; values below 0.001 use the plain form
"4.9e-04", which TypesetLabel() turns into a power of ten.
Examples
FormatP(c(0.0039, 0.055, 0.5, 4.9e-4, NA))
#> [1] "0.0039" "0.055" "0.5" "4.9e-04" "n.e."