title: r import data column with occasional unknown strings
body: <p>Using R, I'm importing large .csv datasets in a data frame.  My problem is that some of my numeric data columns contain the occasional character string. </p>
  
  <pre><code> thisData["colName"] &lt;- lapply(thisData["colName"],as.numeric)
  </code></pre>
  
  <p>doesn't work.  Neither does this:</p>
  
  <pre><code>thisData["colName"] &lt;- as.integer(thisData["colName"])      
  </code></pre>
  
  <p>I would like to just set any strings in the numeric data columns to NA.  Any easy way to do this without nested for loops going through every entry looking for something that looks like a string?</p>