title: looking for the source of R's rank function
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/14035506/how-to-see-the-source-code-of-r-internal-or-primitive-function">How to see the source code of R .Internal or .Primitive function?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm searching for the C source used to compute R's <code>rank</code> function</p>
  
  <p>I've looked in the <a href="http://fossies.org/dox/R-2.15.2/cov_8c_source.html" rel="nofollow noreferrer"><code>R/src/main/</code></a> directory and i can't find it. Does anyone know where 
  i can find the source code for what R calls when i use R's internal rank function? e.g. what is called when one does <code>.Internal(rank(x,"average"))</code>.</p>
  
  <p>Alternatively, i would like to ensure that the efficient way to get the 
  rank vector corresponding to a vector of floats is to first sort them.</p>