1

I have a big issue in reading in .csv files into R that are in Eastern Europe ISO-8859-13 encoding. Does anybody have solution for this?

read.csv("myFile.csv", encoding = "ISO-8859-13")
zx8754
  • 46,390
  • 10
  • 104
  • 180
Justas Mundeikis
  • 841
  • 1
  • 9
  • 17

1 Answers1

3

We need to use fileEncoding instead of encoding (as suggeseted by @Scarabee in the comments):

read.csv("myFile.csv", fileEncoding = "ISO-8859-13")

In bash we can retrieve the file encoding with:

$ file -i ./weirdo.csv

Tell R how the file is encoded by pasting the output from charset= which could be for example charset=iso-8859-1

read.csv("weirdo.csv", fileEncoding = "iso-8859-1")
zx8754
  • 46,390
  • 10
  • 104
  • 180
Mat D.
  • 413
  • 6
  • 15