title: R: read .dta file and use value labels only for selected variables to create a factor
body: <p>What is the easiest way to read a .dta file in R and convert only specific variables as factors, using Stata value labels? I didn't find a way to specify the <code>convert.factors</code> option in the <code>foreign</code> package. I also failed with the <code>mimisc</code> package.</p>
  
  <pre><code>library('foreign')
  df &lt;- read.dta("statafile.dta", convert.factors = TRUE)
  </code></pre>