Re: [R] sprintf() question

2009-05-18 Thread Daniel Nordlund
> -Original Message- > From: Peter Dalgaard [mailto:p.dalga...@biostat.ku.dk] > Sent: Monday, May 18, 2009 12:15 AM > To: Daniel Nordlund > Cc: ted.hard...@manchester.ac.uk; r-help@r-project.org > Subject: Re: [R] sprintf() question > > Daniel Nordlund wrote: >

Re: [R] sprintf() question

2009-05-18 Thread Peter Dalgaard
Daniel Nordlund wrote: Enlightenment is what I asked for, and it is what I got. I was having a senior moment I guess. I was picturing 8 as binary 0100, when obviously it is binary 1000. So yes, the required power of 2 is 1, and it is fine with me that Windows implementation does not display i

Re: [R] sprintf() question

2009-05-17 Thread Ei-ji Nakama
iel Nordlund : >> -Original Message- >> From: Ted Harding [mailto:ted.hard...@manchester.ac.uk] >> Sent: Sunday, May 17, 2009 3:32 PM >> To: Daniel Nordlund >> Cc: r-help@r-project.org >> Subject: RE: [R] sprintf() question >> >> On 17-May-09 22:03:1

Re: [R] sprintf() question

2009-05-17 Thread Daniel Nordlund
> -Original Message- > From: Ted Harding [mailto:ted.hard...@manchester.ac.uk] > Sent: Sunday, May 17, 2009 3:32 PM > To: Daniel Nordlund > Cc: r-help@r-project.org > Subject: RE: [R] sprintf() question > > On 17-May-09 22:03:19, Daniel Nordlund wrote: > >

Re: [R] sprintf() question

2009-05-17 Thread Ted Harding
On 17-May-09 22:03:19, Daniel Nordlund wrote: > When I type the following, I get results different from what I > expected. > >> sprintf('%a',3) > [1] "0x1.8" > > Shouldn't the result be > > [1] "0x1.8p+2" Well, not "p+2" but "p+1" (0x1.8 = 1.1000[2] ; *2 = 11.000[2] = 3[10]) ; however, I get

[R] sprintf() question

2009-05-17 Thread Daniel Nordlund
When I type the following, I get results different from what I expected. > sprintf('%a',3) [1] "0x1.8" Shouldn't the result be [1] "0x1.8p+2" I read through the help ?sprintf and didn't find anything that changed my expectation. What am I misunderstanding? I am using R-2.9.0 binary from CRA