Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
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.

Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
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 >

Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Howard, Tim G (DEC) via R-help
;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

[R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
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