Import dataset with spanish special characters into R

1.1k Views Asked by At

I'm new to R and I've imported a dataset in a CSV file format created in Excel into my project using the "Import Dataset from Text File" function. However the dataset displays spanish special characters (á, é, í, ó, ú, ñ) with the � symbol, as below:

Nombre      Direccion    Beneficiado
Mu�oz      B�rbara      H�medo  
...

Subsequently I tried with this code to make R display the spanish special characters:

Encoding(dataset) <- "UTF-8"

And received the following answer:

Error in `Encoding<-`(`*tmp*`, value = "UTF-8") : 
a character vector argument expected

So far I haven't been able to find a solution to this.

I'm working in Rstudio Version 0.98.1083, in Windows 7.

Thanks in advance for your help.

0

There are 0 best solutions below