title: Merge or cbind xts object with dataframe
body: <p>I have a dataframe with monthly time series (various financial and economic variables), something like this:</p>
  
  <pre><code>var1 &lt;- c('1','2','3')
  var2 &lt;- c('1','2','3')
  Date &lt;- as.Date(c('1995-11-1','1995-12-1','1996-1-1'))
  df &lt;- data.frame(Date, var1, var2)
  </code></pre>
  
  <p>and I would like to add a number of further variables which I am downloading from FRED, like this:</p>
  
  <pre><code>library('quantmod')
  y&lt;-getSymbols('T10Y2Y',src='FRED', auto.assign=FALSE)
  y2&lt;-to.monthly(y)
  </code></pre>
  
  <p>y is an "xts" "zoo" object. Now, y2 is of a different length than my existing dataframe. What would be the easiest way to merge or cbind the y2 to the dataframe, while only keeping the number of dates that are in the dataframe (in the MinExample above, keeping only those 3 months).</p>
  
  <p>I have tried merge(df, y2, by='Date') however the y2 object does not really have a date, rather an index with dates. I am thankful for any suggestions.</p>