title: Is it possible to have a range of numbers in a data frame?
body: <p>Is it possible in R to directly input a range of numerical values into a cell of a data frame (or some other data type) and have it return true if a number matches that cell?</p>
  <p>I'm thinking something like:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">A</th>
  <th style="text-align: center;">B</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">n1</td>
  <td style="text-align: center;">1-2</td>
  </tr>
  <tr>
  <td style="text-align: left;">n2</td>
  <td style="text-align: center;">3-5</td>
  </tr>
  <tr>
  <td style="text-align: left;">n3</td>
  <td style="text-align: center;">6-9</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Then I want df[3,2] == 7 to return true.</p>
  <p>Essentially what I want to do is return column A whenever a number falls within range specified by column B. I can think of complex solutions to do this, but I'm hoping I'm missing something easy and straightforward.</p>