title: How to delete the 0 before a number?
body: <p>I'm having the following difficulty in R: a dataframe has a column with some IDs, which are in the character format. What's the most concise way I can delete the 0s in front?</p>
  <p>Example:</p>
  <p>This is what I have:</p>
  <pre><code>ID &lt;- as.character(c(&quot;001001&quot;,&quot;0001002&quot;,&quot;01003&quot;,&quot;001004&quot;,&quot;1005&quot;))
  order &lt;- c(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;)
  df &lt;- as.data.frame(cbind(ID, order))
  </code></pre>
  <p>This is what I want:</p>
  <pre><code>ID2 &lt;- as.character(c(&quot;1001&quot;,&quot;1002&quot;,&quot;1003&quot;,&quot;1004&quot;,&quot;1005&quot;))
  order2 &lt;- c(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;)
  df2 &lt;- as.data.frame(cbind(ID, order))
  </code></pre>
  <p>I've tried replacing strings but it deletes the 0s I don't want (ex: the ID2[1] = 11).</p>
  <p>Thanks in advance!</p>