title: Subsetting data frame by multiple criteria using data.table
body: <p>Suppose I have the following code:</p>
  
  <pre><code>library(data.table)
  #read in data
  data = fread("C:/Users/lar2/Desktop/Science/test.tsv")
  </code></pre>
  
  <p>I know how to subset the data frame using one element:</p>
  
  <pre><code>data_sub = data[data$V1==1]
  </code></pre>
  
  <p>Suppose I have a list:</p>
  
  <pre><code>list = c(1,2,3,4,1,55,66)
  </code></pre>
  
  <p>Pseudocode:</p>
  
  <pre><code>data_sub = data[data$V1 in list]
  </code></pre>
  
  <p>How do I subset the data frame to only include rows where data$V1 is in list?</p>