reading a csv file with repeated row names in R

前端 未结 7 1390
天命终不由人
天命终不由人 2020-12-09 15:55

I am trying to read a csv file with repeated row names but could not. The error message I am getting is Error in read.table(file = file, header = header, sep = sep, qu

7条回答
  •  被撕碎了的回忆
    2020-12-09 16:31

    I was getting the same "duplicate 'row.names' are not allowed" error for a small CSV. The problem was that somewhere outside of the 14x14 chart area I wanted there was a random cell with a space/other data.

    Discovered the answer when I ran it "row.names = NULL" and there were multiple rows of blank data below my table (and therefore multiple duplicate row names all "blank").

    Solution was to delete all rows/columns outside the table area, and it worked!

提交回复
热议问题