title: Why write.csv and read.csv are not consistent?
body: <p>The problem is simple, consider the following example:</p>
  
  <pre><code>m &lt;- head(iris)
  write.csv(m, file = 'm.csv')
  m1 &lt;- read.csv('m.csv')
  </code></pre>
  
  <p>The result of this is that <code>m1</code> is different from the original object <code>m</code> in that it has a new first column named "X". If I really wanted to make them equal, I have to use additional arguments, like in these two examples:</p>
  
  <pre><code>write.csv(m, file = 'm.csv', row.names = FALSE)
  # and then
  m1 &lt;- read.csv('m.csv')
  </code></pre>
  
  <p>or</p>
  
  <pre><code>write.csv(m, file = 'm.csv')
  m1 &lt;- read.csv('m.csv', row.names = 1)
  </code></pre>
  
  <p>The question is, what is the reason of this difference? in particular, why if <code>write.csv</code> and <code>read.csv</code> are supposedly intended to stick to the Excel convention, the don't import the same object that was exported in the first place? To me this is a very counter intuitive behavior and highly undesirable.</p>
  
  <p>(this results happens exactly the same if I use the csv2 variants of these functions)</p>
  
  <p>Thanks in advance!</p>
  
  <hr>
  
  <p>These are the data.frames <code>m</code> and <code>m1</code> if you prefer not to use R to see the example:</p>
  
  <pre><code>&gt; m
    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
  1          5.1         3.5          1.4         0.2  setosa
  2          4.9         3.0          1.4         0.2  setosa
  3          4.7         3.2          1.3         0.2  setosa
  4          4.6         3.1          1.5         0.2  setosa
  5          5.0         3.6          1.4         0.2  setosa
  6          5.4         3.9          1.7         0.4  setosa
  
  &gt; m1
    X Sepal.Length Sepal.Width Petal.Length Petal.Width Species
  1 1          5.1         3.5          1.4         0.2  setosa
  2 2          4.9         3.0          1.4         0.2  setosa
  3 3          4.7         3.2          1.3         0.2  setosa
  4 4          4.6         3.1          1.5         0.2  setosa
  5 5          5.0         3.6          1.4         0.2  setosa
  6 6          5.4         3.9          1.7         0.4  setosa
  </code></pre>