警告消息:In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string

Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string

我完全是 Rstudio 的初学者,我只想上传一个文件,这样我就可以做一些统计分析。我已经被这个问题困扰了几个小时了。我有一个 excel 文件,我想在 R-studio 中查看,但在尝试将其作为 CSV.file 上传时收到此消息(同时作为 CSV_MS-DOS 和 CSV_"comma delimenated")

Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string.

怎么了?请分步骤描述我应该如何解决它,因为我不习惯 Rstudio。 (在转换为 CSV 之前,我已经删除了 excelsheet 中的一些内容:注释、公式和居中列。仍然不起作用)

试图阅读类似问题中的其他答案,但我一无所知。请帮忙!

使用的命令:

C13<- read.csv(file.choose(), header=TRUE)

Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string

C14<- read.table(file.choose(), header=TRUE, sep=",")

Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string

C15<- read.delim(file.choose(), header=TRUE)

Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string

您在文件中的某处有一个单独的单引号,如 O'Rourke 这个名字,删除它,希望它能起作用,它对我有用!