R reading a tsv file using specific encoding

前端 未结 3 1468
粉色の甜心
粉色の甜心 2021-01-17 21:49

I am trying to read a .tsv (tab-separated value) file into R using a specific encoding. It\'s supposedly windows-1252. And it has a header.

Any sugg

3条回答
  •  佛祖请我去吃肉
    2021-01-17 22:19

    Something like this perhaps?

    mydf <- read.table('thefile.txt', header=TRUE, sep="\t", fileEncoding="windows-1252")
    str(mydf)
    

提交回复
热议问题