| fix_negative_zero | R Documentation |
Corrects floating-point rounding artifacts that produce "-0.00" or similar negative zero strings. Works on character vectors, replacing patterns like "-0.00", "-0.000", etc. with their positive equivalents, even when embedded within larger strings (e.g., "(-0.00, 1.23)" becomes "(0.00, 1.23)").
fix_negative_zero(x, marks = NULL)
x |
Character vector of formatted numbers. |
marks |
Optional list with |
When marks is supplied, also replaces the period decimal mark with
the locale-appropriate decimal mark.
Character vector with negative zeros corrected.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.