title: How to get the recency value?
body: <p>I want to get the recent value. </p>
  
  <pre><code> ID month_0   month_01 month_02 month_03 
   1        0         10        0        0
   2       10          0        0        0
   3       10          0       35        0
   4        0          0       15        0
   5        0          0        0       35
  </code></pre>
  
  <p>My data is as above,
  I want to get the recency value. </p>
  
  <pre><code>recency
  id 1 -&gt; 1
  id 2 -&gt; 0
  id 3 -&gt; 0
  id 4 -&gt; 2
  id 5 -&gt; 3
  </code></pre>
  
  <p>Please help me how I can get the recency value.</p>