title: How to add leading zeros?
body: <p>I have a set of data which looks something like this:</p>
  
  <pre><code>anim &lt;- c(25499,25500,25501,25502,25503,25504)
  sex  &lt;- c(1,2,2,1,2,1)
  wt   &lt;- c(0.8,1.2,1.0,2.0,1.8,1.4)
  data &lt;- data.frame(anim,sex,wt)
  
  data
     anim sex  wt anim2
  1 25499   1 0.8     2
  2 25500   2 1.2     2
  3 25501   2 1.0     2
  4 25502   1 2.0     2
  5 25503   2 1.8     2
  6 25504   1 1.4     2
  </code></pre>
  
  <p>I would like a zero to be added before each animal id:</p>
  
  <pre><code>data
     anim sex  wt anim2
  1 025499   1 0.8     2
  2 025500   2 1.2     2
  3 025501   2 1.0     2
  4 025502   1 2.0     2
  5 025503   2 1.8     2
  6 025504   1 1.4     2
  </code></pre>
  
  <p>And for interest sake, what if I need to add two or three zeros before the animal id's?</p>