title: R divide each column in dataframe by last row value
body: <p>I have a dataframe and am trying to divide each column in dataframe by last row value:</p>
  
  <pre><code>A &lt;- c(1:10)
  B &lt;- c(2:11)
  C &lt;- c(3:12)
  
  df1 &lt;- data.frame(A,B,C)
  
  
  df2 &lt;- df1/df1[10,]
  </code></pre>
  
  <p>However I get an error.
  I would be grateful to know what I am doing wrong.</p>