Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread Marc Schwartz via R-devel
> On Mar 22, 2019, at 7:25 PM, peter dalgaard wrote: > > > >> On 22 Mar 2019, at 18:07 , Martin Maechler >> wrote: >> >> gives (on Linux R 3.5.3, Fedora 28) >> >> d=10 d=7 d=2 d=1 d=0 >> [1,] "123456" "123456" "123456" "1e+05" "%#4.0-1e" >> [

Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread peter dalgaard
> On 22 Mar 2019, at 18:07 , Martin Maechler wrote: > > gives (on Linux R 3.5.3, Fedora 28) > > d=10 d=7 d=2 d=1 d=0 > [1,] "123456" "123456" "123456" "1e+05" "%#4.0-1e" > [2,] "12345.6""12345.6""12346" "12346" "%#4.0-1e" > [3,] "1234.56

Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread Martin Maechler
> peter dalgaard > on Fri, 22 Mar 2019 17:30:19 +0100 writes: > FWIW, it doesn't seem to be happening on Mac OS: >> format(2^30, digits=0) > [1] "1.e+09" >> prettyNum(12345.6, digits=0) > [1] "1.e+04" > A glibc misfeature? It seems (and note we are talking ab

Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread peter dalgaard
FWIW, it doesn't seem to be happening on Mac OS: > format(2^30, digits=0) [1] "1.e+09" > prettyNum(12345.6, digits=0) [1] "1.e+04" A glibc misfeature? -pd > On 22 Mar 2019, at 10:10 , Martin Maechler wrote: > > Thank you, Robert for raising this here ! > >> Robert McGehee >>on T

Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread Robert McGehee
eems to make the problem disappear for me in all cases. However, the odd output I encountered along the way seemed worthy of comment. HTH, Robert -Original Message- From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] Sent: Friday, March 22, 2019 5:11 AM To: Robert McGehee

Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread Martin Maechler
Thank you, Robert for raising this here ! > Robert McGehee > on Thu, 21 Mar 2019 20:56:19 + writes: > R developers, > Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on

[Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-21 Thread Robert McGehee
R developers, Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on an online R evaluator and saw the same problem, so it's not limited to my box at least. I see the problem in both R 3.5.3 and R 3.