title: R: Why am I getting an extra column titled "X.1" in my dataframe after reading my .txt file?
body: <p>I have got this .txt file outputed by a microscope to process. </p>
  
  <pre><code>#read the .txt file generated by microscope, skipping the first 9 lines of garbage information
  df &lt;- read.csv("Objects_Population - AllCells.txt", sep="\t", skip = 9,header=TRUE, fill = T)
  </code></pre>
  
  <p>Then I started looking at the structure of the dataframe, everything seems fine except I now found an extra column in the end of the data frame named "x.1" and all rows of it are NA values. I don't see this column when I open the .txt file in excel. I suspect the problem has something to do with the column names generated by microscope, they contain quite some special characters</p>
  
  <p>Below is the dataframe read by Excel(only showing the last 2 columns since I have 132 columns, and their names are disgustingly long):</p>
  
  <pre><code>AllCells - Cell Contact Area with Neighbors [%] AllCells - Nucleus Nearest Neighbor Distance [Âµm]
  0                                               4.82083
  21.9512                                         0
  15.7895                                         0
  29.4118                                         0.584611
  0                                               4.21569
  0                                               1.99599
  0                                               3.50767
  ...
  </code></pre>
  
  <p>This has happened to me before but I never took it too serious as I was always interested in a subset of my data frame. Now I'm looking at all columns then this starts to bothering me.</p>
  
  <p>Is there any way I can read them correctly without R attaching that additional "X.1" column in the end? Preferably not manually delete or subset out the last column...</p>
  
  <p>Cheers,
  ML</p>