title: How to update values in a dplyr pipe?
body: <p>I want to update values in a new column.</p>
  
  <p>Here's my data : </p>
  
  <pre><code>people&lt;- c("father", "parents", "father", "children", "girl", "boy", "grand father", "grand mother", "grandparents" ) 
  dataset0 &lt;- data.frame(people)
  dataset0
  </code></pre>
  
  <p>And the output : </p>
  
  <pre><code>father              
  parents             
  father              
  children                
  girl                
  boy             
  grand father                
  grand mother                
  grandparents
  </code></pre>
  
  <p>Expected output : </p>
  
  <pre><code> people           people_update
  
  father            parents   
  parents           parents   
  father            parents   
  children          children
  girl              children
  boy               children
  grand father      grandparents          
  grand mother      grandparents      
  grandparents      grandparents
  </code></pre>
  
  <p>I tried to use <code>replace()</code> </p>
  
  <pre><code>dataset &lt;- dataset0 %&gt;%
     mutate(people_update = replace(people, people =="girl", "children")) %&gt;%
     mutate(people_update = replace(people, people =="boy", "children")) 
   dataset
  </code></pre>
  
  <p>but this doesn't work.  The second <code>mutate()</code> command cancels the first <code>mutate()</code> command.</p>