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
Hi, Thanks for this. To be clear, I did not intend to use scientific notation, I just happened to stumble upon this when using prettyNum on numbers large enough that R switched to scientific notation and I noticed the problem. I just made this artificial example just to show with an example usin

[Rd] Status of R_unif_index

2019-03-22 Thread Ralf Stubner
Dear List, section "6.3 Random number generation" of WRE [1] lists unif_rand(), norm_rand() and exp_rand() as the interface to R's RNG. Now R_ext/Random.h also has double R_unif_index(double); Can this be also treated as an official API function that may be called from a package? Thanks Ral

[Rd] R 3.6.0 scheduled for April 26

2019-03-22 Thread Peter Dalgaard via R-devel
Full schedule is available on developer.r-project.org. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __

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