From m@echler @ending from @t@t@m@th@ethz@ch  Fri Oct 26 15:04:26 2018
From: m@echler @ending from @t@t@m@th@ethz@ch (Martin Maechler)
Date: Fri, 26 Oct 2018 15:04:26 +0200
Subject: [Rd] small bug in formatC?
In-Reply-To: <CAARY7kjB_L86pTUoSKNAMan8M9Jdhvais--8BoBrnRKGPSmxwA@mail.gmail.com>
References: <CAARY7kjB_L86pTUoSKNAMan8M9Jdhvais--8BoBrnRKGPSmxwA@mail.gmail.com>
Message-ID: <23507.4314.794779.406047@stat.math.ethz.ch>

>>>>> David Hugh-Jones 
>>>>>     on Thu, 25 Oct 2018 17:46:47 +0100 writes:

> formatC(0.0001, digits = 3, format = "f", zero.print="< 0.01")
> Error in strrep(" ", nc - i1) : invalid 'times' value
> 
> The problem, if it is one, is in .format.zeros:
> .format.zeros("0.000", "xxxxxx")
> Error in strrep(" ", nc - i1) : invalid 'times' value
> 
> R version 3.5.1.
> 
> David

Thank you, David.

Yes, this looks like a bug / wrong assumption in  .format.zeros().
I will have a look (and report back).

Martin Maechler
ETH Zurich and R Core



[Rd] small bug in formatC?
Martin Maechler