title: R string cleaning
body: <p>I working with some strings that is very messy as shown below</p>
  
  <pre><code> Value
   -------------------
   25 
   32.12 .  (05- 
   33.90 ,
   46.70 ,
   () 26.60
   27.2  
   23.24 .  (12-
   36.52 ,
   27.1814404432133 [
   29.73 .  (22-
   31.8058003525076 [
   35.40 ,
   38.44 . 
   46.14 ,
   29.26 [
   25.44 .
  </code></pre>
  
  <p>I am not sure how to clean this efficiently such that this looks like this.</p>
  
  <pre><code> Value
   -------------------
   25 
   32.12  
   33.90
   46.70
   26.60
   27.2  
   23.24
   36.52
   27.1814404432133
   29.73
   31.8058003525076
   35.40
   38.44
   46.14
   29.26
   25.44
  </code></pre>
  
  <p>I tried using sub function, <code>sub(" .*", '', Value)</code> to capture everything before space but that did not work, so looking for some suggestions or tips on how to clean this string.</p>
  
  <pre><code>Value &lt;- c(" 25 \n", "  32.12 .  (05-", "33.90 ,\n", "46.70 ,\n", " () 26.60 ", 
             " 27.2  ", "  23.24 .  (12-", "36.52 ,\n", " 27.1814404432133\n\n[", 
             "  29.73 .  (22-", " 31.8058003525076\n\n[", "35.40 ,\n", "  38.44 .\n", 
             "46.14 ,\n", " 29.26\n\n[", "  25.44 .\n")
  df &lt;- data.frame(Value) 
  </code></pre>