title: R source code .Call function
body: <p>I was looking at the source_code of cov in R, and run into the a paragraph of code that I don't quite understand. </p>
  
  <p>The mathematical definition of covariance <a href="http://en.wikipedia.org/wiki/Covariance">goes</a> here.</p>
  
  <pre><code>if (method == "pearson") 
      .Call(C_cov, x, y, na.method, method == "kendall")
  else if ...
  </code></pre>
  
  <p>The help manual says something about the .Call function:</p>
  
  <pre><code>CallExternal {base} R Documentation
  Modern Interfaces to C/C++ code
  Description
  Functions to pass R objects to compiled C/C++ code that has been loaded into R.
  </code></pre>
  
  <p>I am wondering where can I find the source code of how to calculate the covariance either C++ or C or whatever. </p>
  
  <p>Thanks.</p>