Skip to content
Prev 237249 / 398500 Next

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 
integers, and I want to convert them to integer values.  Strtoi works 
well, except when there are leading zeros on the string.  Could anyone 
suggest a way to remove those leading zeros?

Thanks

Paul