99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線電話:13121318867

登錄
2018-11-07 閱讀量: 2728
R里關(guān)于文件讀取的問題

文件讀入錯(cuò)誤:

> read.csv(file="D:\\Data\\rd\\01.csv",header=TRUE)
錯(cuò)誤于make.names(col.names, unique = TRUE) :
??'<ff><fe><53>'多字節(jié)字符串有錯(cuò)
此外: 警告信息:
1: In read.table(file = file, header = header, sep = sep, quote = quote,??:
??line 1 appears to contain embedded nulls
2: In read.table(file = file, header = header, sep = sep, quote = quote,??:
??line 2 appears to contain embedded nulls
3: In read.table(file = file, header = header, sep = sep, quote = quote,??:
??line 3 appears to contain embedded nulls
4: In read.table(file = file, header = header, sep = sep, quote = quote,??:
??line 4 appears to contain embedded nulls
5: In read.table(file = file, header = header, sep = sep, quote = quote,??:
??line 5 appears to contain embedded nulls
>

把csv表格header行刪除后就能讀入,但保留header就出錯(cuò),why?

因?yàn)樵撐募?假的CSV 格式文件

為了擺顯下(或者說不迷信什么后綴名), 就按照你的“誤判”格式,進(jìn)行讀取的。 readLines, 打開記事本等等 發(fā)現(xiàn) 是TAB 分開的,以及編碼都有可能有問題。 就嘗試了編碼變化。

當(dāng)然最實(shí)際的 做法是, 既然是 假的 CSV 格式文件, 可以變真的 CSV文件, 比如 EXCEL 另存為 csv格式就應(yīng)該可以??讀取了。

0.0000
5
關(guān)注作者
收藏
評(píng)論(0)

發(fā)表評(píng)論

暫無數(shù)據(jù)
推薦帖子