ard, Tim G (DEC) ; R mailing list
Subject: Re: [R] Formatting zeroes with prettyNum
Tim,
The purpose of the `replace.zero` argument is to allow longer replacements.
See for example the behaviour with a character vector input:
> prettyNum("0", zero.print = "- ", replace.
place = TRUE)
[1] " "
Warning message:
In .format.zeros(x, zero.print, replace = replace.zero) :
'zero.print' is truncated to fit into formatted zeros; consider 'replace=TRUE'
When zero.print is only one character, it doesn't give a warning.
Tim
>
;t give a warning.
Tim
> -Original Message-
> From: R-help On Behalf Of Marttila Mikko via
> R-help
> Sent: Friday, May 23, 2025 7:07 AM
> To: R mailing list
> Subject: [R] Formatting zeroes with prettyNum
>
> ATTENTION: This email came from an external source. Do no
Dear list,
Have I stumbled upon a bug, or am I holding `prettyNum()` wrong? Please see
below.
Best,
Mikko
> prettyNum(0, zero.print = "- ", replace.zero = TRUE)
[1] "-"
Warning message:
In .format.zeros(x, zero.print, replace = replace.zero) :
'zero.print' is truncated to fit into formatted
4 matches
Mail list logo