title: Normalisation of data in rows in R
body: <p>I'd like to normalize values in rows of a data frame.
  In other words, divide every row in a given column by a ratio calculated from the sum of all the rows in a given column to the lowest sum of the rows. Here is my example:</p>
  
  <pre><code>df &lt;- data.frame(x = 5:1, y = 2:6, z = 11:25)
  </code></pre>
  
  <p>finding a column with the lowest sum</p>
  
  <pre><code>sum(df$x)
  sum(df$y)
  sum(df$z)
  </code></pre>
  
  <p>getting normalised values</p>
  
  <pre><code>df$x_norm &lt;- df$x/(sum(df$x)/sum(df$x))
  df$y_norm &lt;- df$y/(sum(df$y)/sum(df$x))
  df$z_norm &lt;- df$z/(sum(df$z)/sum(df$x))
  </code></pre>