title: Removing parentheses as unwanted text in R using gsub
body: <p>I'm trying to clean up a column in my data frame where the rows look like this:</p>
  
  <pre><code>1234, text ()
  </code></pre>
  
  <p>and I need to keep just the number in all the rows.  I used:</p>
  
  <pre><code>df$column = gsub(", text ()", "", df$column)
  </code></pre>
  
  <p>and got this:</p>
  
  <pre><code>1234()
  </code></pre>
  
  <p>I repeated the operation with only the parentheses, but they won't go away. I wasn't able to find an example that deals specifically with parentheses being eliminated as unwanted text. <code>sub</code> doesn't work either.</p>
  
  <p>Anyone knows why this isn't working?</p>