title: Calculate AUC in R?
body: <p>Given a vector of scores and a vector of actual class labels, how do you calculate a single-number AUC metric for a binary classifier in the R language or in simple English? </p>
  
  <p>Page 9 of <a href="http://www.site.uottawa.ca/~stan/csi7162/presentations/William-presentation.pdf">"AUC: a Better Measure..."</a> seems to require knowing the class labels, and here is <a href="http://dwinnell.com/SampleError.m">an example in MATLAB</a> where I don't understand </p>
  
  <pre><code>R(Actual == 1))
  </code></pre>
  
  <p>Because R (not to be confused with the R language) is defined a vector but used as a function?</p>