读取txt文件时遇到的问题(带引号的字符串中的EOF) [英] Problems with reading a txt file (EOF within quoted string)
问题描述
我试图用 然而,当我尝试使用 我得到这个错误 警告,并且只有3514条6702行显示在 正如其他线程中所建议的,我也试过 有关如何获得 看起来像你的数据实际上有11548行。这样做: 编辑:根据下面的MrFlick的评论进行更新。 I am trying to use However, when I try to use I get this error warning and only 3514 of the 6702 lines appear in ' As suggested in other threads, I also tried Any advice on how I can get It looks like your data actually has 11548 rows. This works: edit: updated according @MrFlick's comment's below. 这篇关于读取txt文件时遇到的问题(带引号的字符串中的EOF)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! read.table()
导入 R (包含由WMO提供的有关气象台站的信息)=nofollow> TXT
):
tmp< ; - read.table(file = ...,sep =;,header = FALSE)
在引用字符串中的eof
tmp
中。从这个文本文件快速浏览,我找不到任何看似有问题的字符。
引用=
。 EOF
警告消失了,但仍然只导入了3514行。
read.table()
为这个特定的txt文件工作吗?
read.table(url('http://weather.noaa.gov/data/nsd_bbsss.txt' ),
sep =';',quote = NULL,comment ='',header = FALSE)
read.table()
to import this TXT
file into R
(contains informations about meteorological stations provided by the WMO):tmp <- read.table(file=...,sep=";",header=FALSE)
eof within quoted string
tmp
'. From a quick look at the text file, I couldn't find any seemingly problematic characters.quote=""
. The EOF
warning disappeared, but still only 3514 lines are imported.read.table()
to work for this particular txt file?read.table(url('http://weather.noaa.gov/data/nsd_bbsss.txt'),
sep=';', quote=NULL, comment='', header=FALSE)