我正在尝试使用以下代码将文本文件读入 R:
d = read.table("test_data.txt")
它返回以下错误消息:
"Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 2 did not have 119 elements"
我试过这个:
read.table("man_cohort9_check.txt", header=T, sep="\t")
但它给出了这个错误:
"Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 43 did not have 116 elements"
不明白怎么回事??