title: Where can I learn how to write C code to speed up slow R functions?
body: <p>What's the best resource for learning how to write C code for use with R?  I know about the <a href="http://cran.r-project.org/doc/manuals/R-exts.html#System-and-foreign-language-interfaces">system and foreign language interfaces</a> section of R extensions, but I find it pretty hard going.  What are good resources (both online and offline) for writing C code for use with R?</p>
  
  <p>To clarify, I don't want to learn how to write C code, I want to learn how to better integrate R and C.  For example, how do I convert from a C integer vector to a R integer vector (or vice versa) or from a C scalar to an R vector?</p>