title: Based on the value in one column change the value in another column
body: <p>I created a table "examres" like this </p>
  
  <pre><code>         names marks result
  1       dinesh    60   pass
  2       aiysha    70   pass
  3         ravi    40   fail
  4       rajesh    55   pass
  5     achyuthy    80   pass
  6      snigdha    30   fail
  7      mounica     0   pass
  8                 55   pass
  9                  0   fail
  10      mourya     0   pass
  11 deepa sinde    25       
  12 hima sekhar    55   pass
  13                30   fail
  14      dhatri    60       
  </code></pre>
  
  <p>In the above table I want to change the result column based on the "marks" column and my condition is marks&lt;50 "fail" else "pass"</p>
  
  <p>I used:</p>
  
  <pre><code>ifelse(examres$marks&lt;50,examres$result&lt;-"fail",examres$result&lt;-"pass")
  </code></pre>
  
  <p>but its not working.</p>