title: How to read csv file in R where some values contain the percent symbol (%)
body: <p><strong>Is there a clean/automatic way to convert CSV values formatted with as percents (with trailing <code>%</code> symbol) in R?</strong></p>
  
  <p>Here is some example data:</p>
  
  <pre><code>actual,simulated,percent error
  2.1496,8.6066,-300%
  0.9170,8.0266,-775%
  7.9406,0.2152,97%
  4.9637,3.5237,29%
  </code></pre>
  
  <p>Which can be read using:</p>
  
  <pre><code>junk = read.csv("Example.csv")
  </code></pre>
  
  <p>But all of the % columns are read as strings and converted to factors:</p>
  
  <pre><code>&gt; str(junk)
   'data.frame':  4 obs. of  3 variables:
   $ actual       : num  2.15 0.917 7.941 4.964
   $ simulated    : num  8.607 8.027 0.215 3.524
   $ percent.error: Factor w/ 4 levels "-300%","-775%",..: 1 2 4 3
  </code></pre>
  
  <p>but I would like them to be numeric values.</p>
  
  <p>Is there an additional parameter for read.csv? Is there a way to easily post process the needed columns to convert to numeric values? Other solutions?</p>
  
  <p><em>Note: of course in this example I could simply recompute the values, but in my real application with a larger data file this is not practical.</em></p>