Re: [Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Bill Dunlap
On Fri, 30 May 2008, Prof Brian Ripley wrote: > On Fri, 30 May 2008, Duncan Murdoch wrote: > > > On 5/30/2008 1:55 PM, Prof Brian Ripley wrote: > >> Well, R has no unsigned quantities, so ultimately you can't actually do > >> this. But using what="int" and an appropriate 'size' (likely to be 8) >

Re: [Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Prof Brian Ripley
On Fri, 30 May 2008, Duncan Murdoch wrote: On 5/30/2008 1:55 PM, Prof Brian Ripley wrote: Well, R has no unsigned quantities, so ultimately you can't actually do this. But using what="int" and an appropriate 'size' (likely to be 8) shold read the numbers, wrapping around very large ones to be

Re: [Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Duncan Murdoch
On 5/30/2008 1:55 PM, Prof Brian Ripley wrote: Well, R has no unsigned quantities, so ultimately you can't actually do this. But using what="int" and an appropriate 'size' (likely to be 8) shold read the numbers, wrapping around very large ones to be negative. (The usual trick of storing intege

Re: [Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Prof Brian Ripley
Well, R has no unsigned quantities, so ultimately you can't actually do this. But using what="int" and an appropriate 'size' (likely to be 8) shold read the numbers, wrapping around very large ones to be negative. (The usual trick of storing integers in numeric will lose accuracy, but might be

Re: [Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Simon Urbanek
On May 29, 2008, at 2:41 PM, Sean Davis wrote: Sorry for the simple question, but I am trying to read an "unsigned long long" using the R readBin() function. Can someone point me in the right direction, or am I better off using C for such things? The file that I am reading will have been

[Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Sean Davis
Sorry for the simple question, but I am trying to read an "unsigned long long" using the R readBin() function. Can someone point me in the right direction, or am I better off using C for such things? The file that I am reading will have been produced on the same machine that is doing the reading.