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
  • 52,746
  • 12
  • 114
  • 209
Justas Mundeikis
  • 935
  • 1
  • 10
  • 19

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
  • 52,746
  • 12
  • 114
  • 209
Mat D.
  • 453
  • 6
  • 15