title: ways for cross correlation in R
body: <p>For cross correlation of a bivariate time series, I use either <code>ccf</code> or <code>acf</code> to plot it, but the two plots are not the same. The first plot by <code>ccf</code> agrees with the lefttop plot of <code>acf</code>, while the second plot by <code>ccf</code> doesn't agree with the rightbottom plot of <code>acf</code>.</p>
  
  <p>I wonder if I miss something? Thanks!</p>
  
  <pre><code>par(mfrow = c(2,1))
  ccf(x[,1],x[,2])     
  ccf(x[,2],x[,1])     
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Q0Rvl.png" alt="enter image description here"></p>
  
  <pre><code>acf(x)  
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Cf3us.png" alt="enter image description here"></p>