title: Create unique Id in R by combining 2 columns
body: <p>I am reading in 2 big .TXT files and filtering them based off a certain code. The codes are located in the 16th column of each file.</p>
  
  <pre><code>Colleges &lt;- read.table("Colleges.txt", sep ="|", fill = TRUE)
  Majors &lt;- read.table("Majors.txt", sep ="|", fill = TRUE)
  </code></pre>
  
  <p>The Data looks like this</p>
  
  <pre><code>bld_name   dpt_name   majors      admin  code  college year
  MLK        English    Literature  Ms. W   T    A&amp;S      18
  Freedom    Math       Stats       Ms. B   R    STEM      18
  MLK       Math        CALC        Ms. B    P    STEM      18
  </code></pre>
  
  <p>After I create the subset and append the two files. I want to create a unique ID using bld_name and dpt_name.</p>
  
  <pre><code>college_sub &lt;- subset(colleges,colleges[[16]] %in% c("T", "R"), drop = TRUE) 
      majors_sub &lt;- subset(majors,majors[[16]] %in% c("T", "R"), drop = TRUE)
  
      combine &lt;- do.call(rbind,list(college_sub,majors_sub)) #Append both files
  
  uniqueID$id &lt;- paste(combine$dpt_name,"-",combine$bld_name)
          cols_g  &lt;- c("dpt_name", "Majors", "Admin", "Year")
          combine &lt;- combine[,cols_g]
  </code></pre>
  
  <p>It should look like this:</p>
  
  <pre><code>Unique ID   majors      admin   code  college  year
  MLK-English Literature  Ms. W    T    A&amp;S      18
  </code></pre>