title: Looping through a column in R
body: <p>I am using the <code>R's stats</code> package and would like to loop through <code>column[x]</code> in <code>all the rows of a dataframe</code>, operate on the data in <code>each cell</code> in the column with a function and pass the result to a new column (with the <code>calculated result</code> in the <code>new column</code> aligned with the data in <code>column[x]</code>)</p>
  
  <p>I've got two problems:  </p>
  
  <ol>
  <li>I can't get it to work </li>
  <li>looping seems to be discouraged in the <code>R articles</code> I've read.  Is there an alternative approach and if not, does anyone have an example of how to carry out the loop?</li>
  </ol>