【发布时间】:2013-11-20 10:46:30
【问题描述】:
我正在尝试使用以下代码将文本文件读入 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"
我不明白出了什么问题??
【问题讨论】:
标签: r csv file-io text-processing