title: How to combine multiple character columns into a single column in an R data frame
body: <p>I am working with Census data and I need to combine four character columns into a single column.</p>
  
  <p>Example:</p>
  
  <pre><code>LOGRECNO STATE COUNTY  TRACT BLOCK
      60    01    001  021100  1053
      61    01    001  021100  1054
      62    01    001  021100  1055
      63    01    001  021100  1056
      64    01    001  021100  1057
      65    01    001  021100  1058
  </code></pre>
  
  <p>I want to create a new column that adds the strings of STATE, COUNTY, TRACT, and BLOCK together into a single string. Example:</p>
  
  <pre><code>LOGRECNO STATE COUNTY  TRACT BLOCK  BLOCKID
      60    01    001  021100  1053   01001021101053
      61    01    001  021100  1054   01001021101054
      62    01    001  021100  1055   01001021101055
      63    01    001  021100  1056   01001021101056
      64    01    001  021100  1057   01001021101057
      65    01    001  021100  1058   01001021101058
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>AL_Blocks$BLOCK_ID&lt;- paste(c(AL_Blocks$STATE, AL_Blocks$County, AL_Blocks$TRACT,    AL_Blocks$BLOCK), collapse = "")
  </code></pre>
  
  <p>But this combines all rows of all four columns into a single string.</p>