title: Remove rows in a dataframe containing values outside multiple intervals
body: <p>Been searching your forum for answers to my question witout results, the nearest I came was: <a href="https://stackoverflow.com/questions/9202578/subset-data-frame-union-multiple-intervals">subset data.frame union multiple intervals</a>! But I don't see how that can help me. Maybe my reading comprehension in english being to weak.</p>
  
  <p>So, I have a data frame <code>study_a</code> containing 246 individuals, all given a specific code to entain anonymity. The code is one of 14 columns, the rest is answers on a questionnaire. An example:</p>
  
  <pre><code>"Code"
  2
  653
  2678
  3965
  7342
  4258
  5245
  </code></pre>
  
  <p>My wish is to find those values outside the intervals 1-2999, 4251-4599 and 7000-7500 and in the end erase these rows (i.e individuals) since they are not supposed to be included in this study.</p>
  
  <p>Except for the link I've also tried:</p>
  
  <pre><code>    in.interval.lo(study_a$"code", 1, 2999) #in.interval.lo(x, lo, hi)
  </code></pre>
  
  <p>But this function don't seem to work for multiple intervals. And furthermore, I get an error message when I try to specify which columns values I want to check (since there are 13 columns in addition to "code").</p>
  
  <p>Thanks in advance for your help, and if this question already have been solved I would be most thankful for a link to it since I've failed in finding it.</p>