title: How to remove only "actual numbers" from a string of characters in R
body: <p>I have a string of numbers and characters</p>
  
  <pre><code>c2 = "list of 2nd C2 H2O 1 12 123"
  </code></pre>
  
  <p>I need to get rid of all digits that are actual numbers, i.e. 1, 12, 123, but not the ones that are part of a character set, i.e. 2nd, C2, H2O. </p>
  
  <p>So far, the best solution I have come up with is this </p>
  
  <pre><code>gsub("? [[:digit:]]*", " ", c2)
  "list of nd C2 H2O   "
  </code></pre>
  
  <p>It successfully gets rid of 1 12 123, while retaining C2 H2O. However, I lost 2 in 2nd. </p>
  
  <p>I am at my wits end.</p>
  
  <p>Thanks! </p>