reading a csv file with repeated row names in R

前端 未结 7 1380
天命终不由人
天命终不由人 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:36

    In short, check your column names. If your first row is the names of columns, you may be missing one or more names.

    Example:

    "a","b","c"
    a,b,c,d
    a,b,c,d
    

    The example above will cause a row.name error because each row has 4 values, but only 3 columns are named.

    This happened to me when I was building a csv from an online resources.

提交回复
热议问题