title: if statement and mutate
body: <pre><code>EMPLTOT_N   FIRMTOT average min
  12289593    4511051 5   1
  26841282    1074459 55  10
  15867437    81243   300 100
  6060684 8761    750 500
  52366969    8910    1000    1000
  137003  47573   5   1
  226987  10372   55  10
  81011   507 300 100
  23379   52  750 500
  13698   42  1000    1000
  67014   20397   5   1
  </code></pre>
  
  <p>My data look like the data above. I want to create a new column EMP using mutate function that:</p>
  
  <pre><code>emp= average*FIRMTOT if EMPLTOT_N/FIRMTOT&lt;min
  and emp=EMPLTOT_N if EMPLTOT_N/FIRMTOT&gt;min
  </code></pre>