title: How to change the numerical values in multiple columns?
body: <p>I have a data set something like this:</p>
  
  <pre><code>df &lt;- tribble(
          ~X,     ~Y,    ~Z,
          "a",     0,     2,  
          "b",     5,     0, 
          "c",     0,     0, 
          "d",     3,     1, 
          "e",     0,     2, 
  )
  </code></pre>
  
  <p>Now, I want to revalue the values in the column of Y and Z if they are zero. So, I basically use the function of <code>case_when</code>. But this returned the values <code>NA</code> if they are non-zero. </p>
  
  <pre><code>df_desired &lt;- df %&gt;% 
    mutate(Y = case_when(Y == 0 ~ 0.0001),
           Z = case_when(Z == 0 ~ 0.0001))
  </code></pre>
  
  <p>I was wondering what I am missing the code. Thanks in advance. </p>