Issue when importing dataset: `Error in scan(…): line 1 did not have 145 elements`

后端 未结 11 1257
我在风中等你
我在风中等你 2020-11-28 22:14

I\'m trying to import my dataset in R using read.table():

Dataset.df <- read.table(\"C:\\\\dataset.txt\", header=TRUE)

But

11条回答
  •  盖世英雄少女心
    2020-11-28 22:30

    Hash # symbol creating this error, if you can remove the # from the start of the column name, it could fix the problem.

    Basically, when the column name starts with # in between rows, read.table() will recognise as a starting point for that row.

提交回复
热议问题