title: How can I use summarise_each for correlations in dplyr?
body: <p>A dataframe has 20 columns, and I want to find the correlation of column "a" with rest of the columns.</p>
  
  <p>How can I do it using dplyr?</p>
  
  <p>I know how to do individual correlations such as this:</p>
  
  <pre><code>test %&gt;%
    dplyr::summarize(cor(a, b))
  </code></pre>
  
  <p>Or summarise_each for mean. </p>
  
  <p>But how can I do it for correlation?</p>
  
  <p>Two use cases:</p>
  
  <ol>
  <li>Where it calculates correlations with <em>every</em> other column in the dataframe.</li>
  <li>Where it calculates correlations with columns I mention.</li>
  </ol>