title: R - Using sqldf to query multiple values from one column in dataframe
body: <p>I'm pretty new to R and trying to use the SQLDF package to query a dataset. I have constructed the following query, which works perfectly and displays the correct data:</p>
  
  <pre><code>sqldf("select AreaName, TimePeriod, Value from df2 where Indicator == 'Obese children (Year 6)' AND AreaName == 'Barking and Dagenham'",
      row.names = TRUE)
  </code></pre>
  
  <p>But I would like to pull the data for 'Richmond upon Thames' as well as Barking and Dagenham. I have tried this:</p>
  
  <pre><code>AND AreaName == 'Barking and Dagenham', 'Richmond upon Thames'
  </code></pre>
  
  <p>Which gives me the following error:</p>
  
  <pre><code>Error in sqliteSendQuery(con, statement, bind.data) : error in statement: near ",": syntax error
  </code></pre>
  
  <p>And I have also tried:</p>
  
  <pre><code>AND AreaName == 'Barking and Dagenham' AND AreaName == 'Richmond upon Thames'
  </code></pre>
  
  <p>Which creates the new dataframe as expected but when I view it, it is empty. I know it is not an issue with the name 'Richmond upon Thames' as I have entered this into the first statement by itself instead of 'Barking and Dagenham' and it works perfectly.
  Could anybody help me with what the correct structure should be?</p>
  
  <p>Many thanks</p>