title: for loop in R that involves 2 columns in a dataframe at a time
body: <p>I am new to loops and am trying to conduct an operation that involves 2 columns in a dataframe. For example:</p>
  
  <pre><code>a = rnorm(6) 
  b = rnorm(6) 
  c = rnorm(6)
  d = rnorm(6)
  e = rnorm(6)
  f = rnorm(6)
  df = data.frame(a, b, c, d, e, f) 
  </code></pre>
  
  <p>I want to loop through <code>df</code> such that I can create a new variable <code>w</code> that is a list. Each value of <code>w</code> is the product of the mean of 2 columns. </p>
  
  <p>Thank you!</p>