title: R: ggplot2 trouble reading a csv data file, object and mapping error
body: <p>I am new to using the ggplot2 package and am unfortunately having trouble with the basics. My data set is in a csv comma delimited file which has been working in R using plot functions but doesn't seem to be working in ggplot2. My csv file looks as follows:</p>
  
  <pre><code>Depth Min Max Average Mode
  34    2   38  5.64    2
  44    2   25  6.27    2
  etc....
  </code></pre>
  
  <p>The code I am using is as follows:</p>
  
  <pre><code>Statsnineteen &lt;- read.csv(file="C:/Users/Holly/Documents/Software Manuals/R
  Stuff/Stats_nineteen.csv", header=TRUE, sep=",")
  p1 &lt;- ggplot(Max, Depth, data = Statsnineteen)
  p1 &lt;- p1 + layer(geom="path") + coord_flip()
  </code></pre>
  
  <p>It then comes up with the following error message between the two p1 lines:</p>
  
  <pre><code>Error in inherits(mapping, "uneval") : object 'Max' not found
  </code></pre>
  
  <p>I know it can read the table as when I use:</p>
  
  <pre><code>Statsnineteen &lt;- read.table(file.....)
  head(Statsnineteen, n=52)
  </code></pre>
  
  <p>It brings up my data table.
  Don't suppose anyone knows if there is a command I've missed out or if there is something wrong with my code?
  Thanks in advance for any help, Holly</p>