title: R - Remove records with question marks (or other characters)
body: <p>I have a vector of over a million records, and some records have characters such as ?, *, &amp; in them (the rest of the record entry is alphanumeric).</p>
  
  <p>I need to identify these records (according to the specific character--e.g., the question mark), and delete them from my main data frame as well as subset them into a separate data frame for examination.</p>
  
  <p>I have used grep and pmatch, but have not had success.  Examples of my code for grep and pmatch are:</p>
  
  <pre><code>new.df &lt;- df[-grep("\\?",df$vector),]
  new.df &lt;- pmatch("?", df$vector)
  </code></pre>
  
  <p>Thanks.</p>