small bug in formatC?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

small bug in formatC?

David Hugh-Jones-3
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

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: small bug in formatC?

Martin Maechler
>>>>> 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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel