I am quite a newbie to R and currently struggling with CSV importing. I am trying to import a large CSV table with accented characters in Italian (such as è,é,ì), but am failing to code it properly.
The command I first tried was:
comuni_giornaliero_dati_fino_31agosto <- read.csv("directory_here", header=FALSE, comment.char="#")
And what I got were messed up accents, e.g.
Agli<e8>
instead of "Agliè"
Mondov<ec>
instead of "Mondovì" etc.
So I tried and guessed the encoding:
guess_encoding("directory_here",n_max=100,threshold = 0.2)
A tibble: 1 x 2 encoding confidence 1 ISO-8859-1 0.47
So I tried specifying the encoding:
comuni_giornaliero_dati_fino_31agosto <- read.csv("directory_here", header=FALSE, comment.char="#",encoding = "ISO-8859-1")
But I still can't have RStudio properly read accents. Any guesses? Feels like an easy task but I am too unfamiliar with R to sort this out.
Thanks in advance!