Re: [R] integer and character conversion

2009-08-23 Thread Gabor Grothendieck
Its not being stored as an integer. Its being stored as a double. If it were stored as an integer you would not get the e: > as.character(10L) [1] "10" > as.character(as.integer(10)) [1] "10" On Sat, Aug 22, 2009 at 7:13 PM, Dajiang J. Liu wrote: > Dear all,I wan

Re: [R] integer and character conversion

2009-08-22 Thread Benilton Carvalho
it's 'scipen' you want to look at.. b On Aug 22, 2009, at 11:16 PM, David Winsemius wrote: On Aug 22, 2009, at 6:13 PM, Dajiang J. Liu wrote: Dear all,I want to convert a long integer to a string, and for example, 1 I used as.character(10) e.g, and it gives me back 1e+???. Wha

Re: [R] integer and character conversion

2009-08-22 Thread David Winsemius
On Aug 22, 2009, at 6:13 PM, Dajiang J. Liu wrote: Dear all,I want to convert a long integer to a string, and for example, 1 I used as.character(10) e.g, and it gives me back 1e+???. What I want is a exact form, not exponential form. Any ideas how to do it? Thank The num

Re: [R] integer and character conversion

2009-08-22 Thread Henrique Dallazuanna
Try this: sprintf("%d", 10) On Sat, Aug 22, 2009 at 8:13 PM, Dajiang J. Liu wrote: > Dear all,I want to convert a long integer to a string, and for example, > 1 > I used as.character(10) e.g, and it gives me back 1e+???. What I > want is a exact form, not exponential form

[R] integer and character conversion

2009-08-22 Thread Dajiang J. Liu
Dear all,I want to convert a long integer to a string, and for example, 1 I used as.character(10) e.g, and it gives me back 1e+???. What I want is a exact form, not exponential form. Any ideas how to do it? Thank you very much. Regards, Dajiang [[alternative HTML version de