2

Sometimes when I load a csv using read.csv I get an extra column called X with a sequential row count as the first column. I have to remove it each time.

Does anyone know why this happens..?

X   Day   Who
1   Tue   Bob
2   Wed   Dan
3   Thur  Joe

Paul.

PaulBeales
  • 475
  • 1
  • 8
  • 21

1 Answers1

0

I had the same problem, and I think I figured it out. Did you perhaps download your CSV from excel? Sometimes, an entry in the last column is larger than the cell of the last column. When you save the spreadsheet as a csv, somehow that overlap registers as a new column, and records a blank column called x. The solution is to expand the final cell to accommodate it's entries. This has worked for me, as bizarre as it sounds.

Lamden
  • 15
  • 6