title: Why are Xs added to data frame variable names when using read.csv?
body: <p>When I use the <code>read.csv()</code> function in <code>R</code> to load data, I often find that an X has been added to variable names.  I think I just about always see it it in the first variable, but I could be wrong.  </p>
  
  <p>At first, I thought <code>R</code> might be doing this because I had a space at the beginning of the variable name - I don't.  </p>
  
  <p>Second, I had read somewhere that if you have a variable that starts with a number, or is a very short variable name, <code>R</code> would add the X.  The variable name is all text and the length of the name of this variable is 12 characters, so it's not short.  </p>
  
  <p>Now, this is purely an annoyance.  I can rename the column, but it does add a step, albeit a small one.  </p>
  
  <p>Is there a way to prevent this from rogue X from infiltrating my data frame?  </p>
  
  <p>Here is my original code:</p>
  
  <pre><code>df &lt;- read.csv("/file/location.filecsv", header=T, sep=",")
  </code></pre>
  
  <p>Here is the variable in question:</p>
  
  <pre><code>str(orders)
  'data.frame':   2620276 obs. of  26 variables:
   $ X.OrderDetailID    : Factor w/ 2620193 levels "(2620182 row(s) affected)",..: 105845
  </code></pre>