title: read csv file in r with spanish characters (´,ñ)
body: <p>I´m trying to add a column to a data frame in R. To do this, I imported a CSV file from Excel, which contains the id column (the same as the one I have in the data frame), and the column with the information I want to add to my data frame. </p>
  
  <p>My problem is that my cvs has spanish characters (´, ñ), and when I use read.csv (as in the following example)</p>
  
  <pre><code>religion &lt;- read.csv("religion.csv", header = TRUE, sep = ",", dec = ".",
                       filled =TRUE, comment.char = "", strip.white = TRUE,
                       stringsAsFactors = TRUE)
  </code></pre>
  
  <p>the characters don't appear, but a question mark appears instead of the characters.</p>
  
  <p>I have tried changing the encoding, with the following encodings:</p>
  
  <p>UTF-8, latin1, </p>
  
  <pre><code>Sys.setlocale("LC_ALL", "ES_ES.UTF-8")
  </code></pre>
  
  <p>But there is no difference.</p>
  
  <p>I gladly appreciate any help.</p>