title: Does calculating correlation between two dataframes require a loop?
body: <p>I have a set of large dataframes that look like A and B:</p>
  
  <pre><code>A &lt;- data.frame(A1=c(1,2,3,4,5),B1=c(6,7,8,9,10),C1=c(11,12,13,14,15 ))
  
    A1 B1 C1
  1  1  6 11
  2  2  7 12
  3  3  8 13
  4  4  9 14
  5  5 10 15
  
  B &lt;- data.frame(A2=c(6,7,7,10,11),B2=c(2,1,3,8,11),C2=c(1,5,16,7,8))
  
    A2 B2 C2
  1  6  2  1
  2  7  1  5
  3  7  3 16
  4 10  8  7
  5 11 11  8
  </code></pre>
  
  <p>I would like to create a vector (C) that denotes the Pearson correlation between A1 &amp; A2, B1 &amp; B2, and C1 &amp; C2. In this case, for example, those correlations are: </p>
  
  <pre><code>[1] 0.95 0.92 0.46
  </code></pre>