How to detect the right encoding for read.csv?

后端 未结 6 1843
遥遥无期
遥遥无期 2020-11-27 11:02

I have this file (http://b7hq6v.alterupload.com/en/) that I want to read in R with read.csv. But I am not able to detect the correct encoding. It seems to be a

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 11:28

    The package readr, https://cran.r-project.org/web/packages/readr/readr.pdf, includes a function called guess_encoding that calculates the probability of a file of being encoded in several encodings:

    guess_encoding("your_file", n_max = 1000)
    

提交回复
热议问题