Re: [R] Problem with long number (from character to numeric class)

2011-02-10 Thread PtitBleu
Hello Dan, I just need to make substractions, comparisons and to use them in a split command. Ptit Bleu. > Hello, > > I have a text file with one column containing long number but stored as > string. > I download the file with read.table (and colClass) and the first row of > this > column is : >

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread Petr Savicky
On Wed, Feb 09, 2011 at 07:39:55AM -0800, PtitBleu wrote: > > Thanks for all your answers. I didn't know this limit. > > I finally found another way to go around this problem: luckily the 4 first > figures are always the same for all these numbers. > I created a new column with as.numeric(substr(

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of PtitBleu > Sent: Wednesday, February 09, 2011 4:15 AM > To: r-help@r-project.org > Subject: [R] Problem with long number (from character to numeric class) >

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread PtitBleu
Thanks for all your answers. I didn't know this limit. I finally found another way to go around this problem: luckily the 4 first figures are always the same for all these numbers. I created a new column with as.numeric(substr(df$BigNumber,5,18)). Numbers are now 14-figures long and it is now ok.

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread David Winsemius
On Feb 9, 2011, at 7:15 AM, PtitBleu wrote: Hello, I have a text file with one column containing long number but stored as string. I download the file with read.table (and colClass) and the first row of this column is : "095842087016731010" As I need to make some calculations with the

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread jim holtman
FAQ 7.31 For 'numerics' there is a limit of about 15 digits of accuracy in the number. On Wed, Feb 9, 2011 at 7:15 AM, PtitBleu wrote: > > Hello, > > I have a text file with one column containing long number but stored as > string. > I download the file with read.table (and colClass) and the fir

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread Marc Schwartz
On Feb 9, 2011, at 6:15 AM, PtitBleu wrote: > > Hello, > > I have a text file with one column containing long number but stored as > string. > I download the file with read.table (and colClass) and the first row of this > column is : > > "095842087016731010" > > As I need to make some calculat

Re: [R] Problem with long number (from character to numeric class)

2011-02-09 Thread Ben Bolker
PtitBleu yahoo.fr> writes: > I have a text file with one column containing long number but stored as > string. > I download the file with read.table (and colClass) and the first row of this > column is : > > "095842087016731010" > > As I need to make some calculations with these numbers, I trie

[R] Problem with long number (from character to numeric class)

2011-02-09 Thread PtitBleu
Hello, I have a text file with one column containing long number but stored as string. I download the file with read.table (and colClass) and the first row of this column is : "095842087016731010" As I need to make some calculations with these numbers, I tried to convert them using as.numeric.