title: How to perform if-else operation on a row in r dataframe
body: <p>I have a dataframe with 5 columns. I need to create a 6th column which should be the result of an if-else operation performed on 3 columns from the dataset.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>index</th>
  <th>prediction</th>
  <th>response</th>
  <th>lwr</th>
  <th>upr</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>23</td>
  <td>22.707441</td>
  <td>25.0</td>
  <td>21.762679</td>
  <td>23.65220</td>
  </tr>
  <tr>
  <td>86</td>
  <td>13.568034</td>
  <td>13.0</td>
  <td>12.789159</td>
  <td>14.34691</td>
  </tr>
  <tr>
  <td>96</td>
  <td>9.138957</td>
  <td>12.0</td>
  <td>7.628405</td>
  <td>10.64951</td>
  </tr>
  <tr>
  <td>111</td>
  <td>26.375961</td>
  <td>22.0</td>
  <td>25.559815</td>
  <td>27.19211</td>
  </tr>
  <tr>
  <td>121</td>
  <td>21.656960</td>
  <td>19.0</td>
  <td>20.738612</td>
  <td>22.57531</td>
  </tr>
  <tr>
  <td>140</td>
  <td>10.715798</td>
  <td>14.0</td>
  <td>9.561180</td>
  <td>11.87042</td>
  </tr>
  <tr>
  <td>153</td>
  <td>20.579496</td>
  <td>19.0</td>
  <td>19.985751</td>
  <td>21.17324</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have to create a new column called 'result' to which should be equal to &quot;yes&quot; if the value in 'response' column is higher than the value in 'lwr' column and lesser than the value in 'upr' column for each row.
  Else the value should be &quot;no&quot;.</p>