title: Undefined columns selected r
body: <p>sorry to annoy you with such a basic problem but I am using data from the European Social Survey and I cannot subset the data for France::</p>
  
  <pre><code>data &lt;- read.dta("ESS1.dta")
  head(data)
  
  france &lt;- data[,data$cntry=="FR"]
  
  # Error in `[.data.frame`(data, , data$cntry == "FR"):  undefinedcolumns selected
  </code></pre>
  
  <p>Thank you</p>