C code programming for statistics Where can we find C code for statistical computing? R is kind of slow when doing a lot of iterations. C is a lot faster but coding is always heavy-duty. I am wondering does anybody have any good source websites on statistical computing in C. Basically if most of the functions in R, especially matrix manipulations, are rewritten in C code, it will be super nice. 
I already know some websites.
1. http://lib.stat.cmu.edu/apstat/


*http://people.sc.fsu.edu/~jburkardt/c_src/c_src.html
I would appreciate if you can provide me with other similar websites.
 A: There is an introductory statistics book which uses C for everything, including a library written by the author Ben Klemens. It's available as a free online pdf from the author's website:
http://modelingwithdata.org/
I haven't used the C code, but have found parts of the book quite useful, both as an introduction to C and for the statistical topics. I believe it also has some useful info on SQL.
A: R, if used correctly, should be fast. As mentioned in the comment, R is largely written in C and Fortran and is quite optimized. Make sure you are using the right data structures and leveraging the built in indexing/vector/matrix methods instead of too many loops. You may also want to compile your R code. Check this out for some useful tips:
http://www.noamross.net/blog/2013/4/25/faster-talk.html 
If you really know what your doing in R and it's still too slow, try switching to NumPy. NumPy's often faster than R, and much easier to do data analysis with than C. I can't recommend trying to write your own version of R in C.
A: You might not want to write all your code in C for statistical computing. As THE statistical language, R is the most powerful language for statistical analysis without any doubt. So what you might really want to do is to speed up your R code with some techniques. Some helpful ways are the following.


*

*Vectorization. 

*Calling C code from R;

*High performance and parallel computing in R. 

