title: How to sum absolute values from columns in dplyr?
body: <p>I have this dataset with two columns and four rows   </p>
  
  <pre><code>x &lt;- c(-1, -2, 2, 3)
  y &lt;- c(0, -3, 2, -2)
  
  cbind(x, y)
  </code></pre>
  
  <p>I want to sum the absolute values of columns <code>x</code> and <code>y</code> using <code>dplyr</code> and add results in column <code>z</code>. It should look like this      </p>
  
  <pre><code>z &lt;- c(1, 5, 4, 5)
  
  cbind(x, y, z)
  </code></pre>
  
  <p>I have tried using <code>mutate</code> and place the argument <code>abs</code> in different positions of a command but nothing works. </p>
  
  <p>Can anyone help this R beginner solve this apparent simple problem?</p>
  
  <p>Thanks, </p>