title: How add and subtract a vector from a data frame row wise in R
body: <p>I want to subtract corresponding elements from each row in a df from a vector.</p>
  <pre><code>&gt; test
    A B
  1 0 0
  2 0 0
  3 0 0
  
  Expected output:
  
  &gt; test + c(3,4)
  
    A B
  1 3 4
  2 3 4
  3 3 4
  
  Actual output:
  
    A B
  1 3 4
  2 4 3
  3 3 4
  </code></pre>
  <p>What is the correct way to do this?</p>