title: Add in missing decimal (001=0.01 and 01=0.1)
body: <p>I have a vector of strings <code>a&lt;-data.table(value=(&quot;001&quot;,&quot;01&quot;))</code> that really should be decimals (0.01 and 0.1) and would liked to split the strings at the first 0 and add in a decimal before it.</p>
  <p>I can split the string and get a list</p>
  <pre><code>A&lt;-strsplit(a$value, &quot;(?=[0])&quot;, perl = TRUE)
  </code></pre>
  <p>so I can envisage doing paste0(x[[1]][1],&quot;.&quot;,x[[1]][2]) inside a function but I'm getting a bit stuck with how to refer to the indices:</p>
  <pre><code>dFun&lt;-function(){
    as.numeric(paste0(x[[1]][1],&quot;.&quot;,x[[1]][2]))
  }
  
  
  purrr::map_df(.x=1:2,.f=dFun)
  </code></pre>
  <p>Any pointers would be much appreciated.</p>