[R] Truncating leading zeros in strings

2010-10-07 Thread E. Paul Wileyto
I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent integers, and I want to convert them to integer values. Strtoi works well, except when there are leading zeros on the string. Could

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread David Winsemius
On Oct 7, 2010, at 9:57 AM, E. Paul Wileyto wrote: I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent integers, and I want to convert them to integer values. Strtoi works well, except

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread Martyn Byng
-project.org] On Behalf Of E. Paul Wileyto Sent: 07 October 2010 14:58 To: r-help@r-project.org Subject: [R] Truncating leading zeros in strings I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent

Re: [R] Truncating leading zeros in strings

2010-10-07 Thread E. Paul Wileyto
Thanks... As I mentioned, I am new to R, and as.integer was not what I stumbled onto. I looked up string conversion in the reference manual, and strtoi is what came up. P On 10/7/2010 10:35 AM, David Winsemius wrote: On Oct 7, 2010, at 9:57 AM, E. Paul Wileyto wrote: I am new to R. I