我有一个.txt
文件,我read.table
在 R 中使用这个文件:
data <- read.table(file="data.txt", sep="\t", comment.char="", header=T,
row.names=NULL)
我发现当我使用 Emacs 尝试稍微清理文件时,将其保存为.txt
,然后尝试将其读入,它会将每一行视为一个项目。此外,我什至发现只需.txt
在 Emacs 中打开,然后保存它已经无法立即读取它。任何想法为什么会这样?
First three lines that DO work:
"tijd" "titel" "bedrag" "staat" "lokatie"
"2013-05-09" " Parrot MKI 9200 " 110 " Zo goed als nieuw " " Amersfoort, UT "
"2013-05-09" " Android Galaxy s4 " 199 " Nieuw " " Nuenen, NB "
First three lines that DON'T work:
"tijd" "titel" "bedrag" "staat" "lokatie"
"2013-05-09" " Parrot MKI 9200 " 110 " Zo goed als nieuw " " Amersfoort, UT "
"2013-05-09" " Android Galaxy s4 " 199 " Nieuw " " Nuenen, NB "
我看不出有什么区别。