I'm reading data into an R data frame by using read.csv2
. With one of my data sets, somehow a few of the variables are put into the next line, creating extra lines and cutting columns. For illustration:
My CSV looks like this:
var1,var2,var3
value1,value2,value3
value1,value2,value3
The data frame, however, turns out like this:
var1 var2
value1 value2
value3
value1 value2
value3
I have used the same command on a lot of CSV-files, even on one with a different sample of the exact same file, but never got this problem. Is there anyone with an idea of what could cause this?
Edit: as I am still not sure how to upload an actual data set, I have uploaded a screenshot of how it looks like. The splits occur in every line with more than 3 columns.