title: combining values of two variables together to create a new variable using r
body: <p>I need to create a new variable by combining the values of two existing variables</p>
  
  <pre><code>anim &lt;- c(1,2,3,4,5,6,7,8,9,10)
  pgrp &lt;- c(1,3,2,4,2,3,1,2,4,3)
  fos &lt;- c(2,1,1,2,1,2,1,2,2,1)
  data &lt;- data.frame(anim,pgrp,fos)
  data
     anim pgrp fos
  1     1    1   2
  2     2    3   1
  3     3    2   1
  4     4    4   2
  5     5    2   1
  6     6    3   2
  7     7    1   1
  8     8    2   2
  9     9    4   2
  10   10    3   1
  </code></pre>
  
  <p>I need my new variable "pf" to take the values of "pgrp" and "fos" as shown below</p>
  
  <pre><code>data
     anim pgrp fos pf
  1     1    1   2 12
  2     2    3   1 31
  3     3    2   1 21
  4     4    4   2 42
  5     5    2   1 21
  6     6    3   2 32
  7     7    1   1 11
  8     8    2   2 22
  9     9    4   2 42
  10   10    3   1 31
  </code></pre>