title: Error in Math.data.frame.....non-numeric variable in data frame:
body: <p>I am reading a csv file into R and trying to do take the log of the data.  The csv file has columns of data with the first row having text headers and the rest numeric data.</p>
  
  <pre><code>data&lt;-read.csv("rawdata.csv",header=T)
  trans&lt;-log(csv2)
  </code></pre>
  
  <p>I get the following error when I do this:</p>
  
  <blockquote>
    <p>Error in Math.data.frame(list(Revenue = c(18766L, 20197L, 20777L,
    23410L,  :  non-numeric variable in data frame: Costs</p>
  </blockquote>
  
  <p>Output of str <em>should</em> have been inserted in Q-body:</p>
  
  <pre><code>data.frame': 167 obs. of 3 variables: 
   $ X: int 18766 20197 20777 23410 23434 22100 22337 21511 22683 23151 ... 
   $ Y: Factor w/ 163 levels "1,452.70","1,469.00",..: 22 9 55 109 158 82 131 112 119 137 ...
   $ Z: num 564 608 636 790 843 ...
  </code></pre>
  
  <p>How do I correct this?</p>