我收到 read.table() 错误:
data <- read.table(file, header=T, stringsAsFactors=F, sep="@")
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 160 did not have 28 elements
我检查了第 160 行,它确实有 28 个元素(它有 27 个 @ 符号)。
我检查了所有 30242 行,有 816534 个 @ 符号,每行 27 个,所以我很确定每一行都有 28 个元素。我还检查了文件以确认除了分隔符之外没有其他任何地方的 @ 符号。
有谁知道这里发生了什么?
编辑:文件第 160 行
158@Mental state: 1. Overall clinical symptoms@MD@S@2002@CMP-005@02@20.67@23.58@Clozapine versus typical neuroleptic medication for schizophrenia@IV@4.47@02@SENSITIVITY ANALYSIS - CHINESE TRIALS@CD000059@6.94@Fixed@16@5@2@45@Chinese trials@YES@Xia 2002 (CPZ)@STD-Xia-2002-_x0028_CPZ_x0029_@579@566@40
edit2:文件的第 161 行
159@Length of surgery (minutes)@MD@Y@1995@CMP-001@01@59.0@47.0@Gamma and other cephalocondylic intramedullary nails versus extramedullary implants for extracapsular hip fractures in adults@IV@23.9@01@Summary: Femoral nail (all types) versus sliding hip screw (SHS)@CD000093@13.3@Random@12@1@1@53@Gamma nail@YES@O'Brien 1995@STD-O_x0027_Brien-1995@958@941@49