title: Concatenating two string variables in r
body: <p>I've seen plenty of discussion on using paste and paste0 to concatenate two strings in r.  However, this does not appear to be working for two string variables.  I have a data frame that looks like the following.  </p>
  
  <pre><code>    series_id   year    period  value   footnote_codes
  1   LASBS260000000000003            1983    M01 15.1              
  2   LASBS260000000000003            1983    M02 15.0              
  3   LASBS260000000000003            1983    M03 14.8              
  4   LASBS260000000000003            1983    M04 14.6
  </code></pre>
  
  <p>I wish to combine the year variable to the period variable to generate a new variable in the data frame called observation. The data frame is called data and I tried the following paste command based on research of similar inquiries.</p>
  
  <pre><code>data$obs&lt;-paste0(toString(data$year),toString(data$period))
  data$obs&lt;-paste(toString(data$year),toString(data$period),sep="")
  </code></pre>
  
  <p>This is not giving me the expected single variable taking on values "1983M01"... as expected.  Any thoughts would be greatly appreciated.</p>
  
  <p>Steve</p>