title: What is the best way to import spss file in R with value labels?
body: <p>I have a spss file which contents variables and value labels. I saw foreign package with <code>read.spss</code> function:</p>
  
  <pre><code>data &lt;- read.spss("2017.sav", to.data.frame = TRUE, use.value.labels = TRUE)
  </code></pre>
  
  <p>If i use <code>use.value.labels = TRUE</code>, all string change to factor variables and i dont want it because they are not factor all.</p>
  
  <p>I found one solution but i dont know if it is the best way to do it</p>
  
  <p>1º First read spss file with previous sentence<br>
  2º select which variables are not factor and change it to string with:</p>
  
  <pre><code>cols &lt;- c("x", "ab")
  
  data[cols] &lt;- lapply(data[cols], as.character)
  </code></pre>
  
  <p>if i dont use <code>use.value.labels = TRUE</code> i  will have not value labels and i cannot export file correctly</p>