title: HOW TO USE CASE WHEN STATEMENT IN R
body: <p>INPUT:-</p>
  <pre><code>ID   NAME    DATE     ATTENDENCE  
  1   murali  2021-08-20  present  
  1   murali  2021-08-21  absent  
  1   murali  2021-08-22  present  
  1   murali  2021-08-23  absent  
  1   murali  2021-08-24  present  
  1   murali  2021-08-25  absent  
  1   murali  2021-08-26  present  
  1   murali  2021-08-27  absent  
  1   murali  2021-08-28  absent  
  1   murali  2021-08-29  absent  
  1   murali  2021-08-30  absent  
  2   krishna 2021-08-20  absent  
  2   krishna 2021-08-21  absent  
  2   krishna 2021-08-22  absent  
  2   krishna 2021-08-23  absent  
  2   krishna 2021-08-24  absent  
  2   krishna 2021-08-25  absent  
  2   krishna 2021-08-26  present  
  2   krishna 2021-08-27  absent  
  2   krishna 2021-08-28  present  
  2   krishna 2021-08-29  present  
  2   krishna 2021-08-30  absent  
  </code></pre>
  <p>OUTPUT:-</p>
  <p>ID NAME DATE ATTENDENCE PRESENT absent<br />
  1 murali 2021-08-20 present 1 0<br />
  1 murali 2021-08-21 absent 0 1<br />
  1 murali 2021-08-22 present 1 0<br />
  1 murali 2021-08-23 absent 0 1<br />
  1 murali 2021-08-24 present 1 0<br />
  1 murali 2021-08-25 absent 0 1<br />
  1 murali 2021-08-26 present 1 0<br />
  1 murali 2021-08-27 absent 0 1<br />
  1 murali 2021-08-28 absent 0 1<br />
  1 murali 2021-08-29 absent 0 1<br />
  1 murali 2021-08-30 absent 0 1<br />
  2 krishna 2021-08-20 absent 0 1<br />
  2 krishna 2021-08-21 absent 0 1<br />
  2 krishna 2021-08-22 absent 0 1<br />
  2 krishna 2021-08-23 absent 0 1<br />
  2 krishna 2021-08-24 absent 0 1<br />
  2 krishna 2021-08-25 absent 0 1<br />
  2 krishna 2021-08-26 present 1 0<br />
  2 krishna 2021-08-27 absent 0 1<br />
  2 krishna 2021-08-28 present 1 0<br />
  2 krishna 2021-08-29 present 1 1<br />
  2 krishna 2021-08-30 absent 0 0</p>