title: SPSS create variable function in R
body: <p>I am trying to switch from SPSS to R, but I'm still stuck on some aspects of the R logic at the moment. Right now, I am trying to rebuild something like the "create new variable" function from SPSS - exactly the follwing SPSS syntax:</p>
  
  <pre><code>COMPUTE ABC_WC  =   1-  ((ABS   (   WC_B    -   WC_A    ))  / ( WC_B +  WC_A + 0.0001))
  </code></pre>
  
  <p>In R, my data frame contains all of the defined variables (<code>WC_A</code>  and <code>WC_B</code>) as columns with X observations in the line. I need to repeat these analyses for a fixed, repeating number of variables every time I do my analyses - so a more or less automated version of this calculation across all 80 variables would be great.</p>
  
  <p>Thank you very much! </p>