This manual will be useful for people looking to extend R with the C compiled code. The motivation for using the C interface with R may be bidirectional. For statisticians programming mainly in R, an interface to C provides fast execution of code and better memory management. The C interface also provides the user to access the existing C libraries. Similarly, people programming in C with the help of the R interface to get an access to huge set of mathematical functions implemented in R. It saves the labour of implementing such functions from scratch in C which may be quite cumbersome. In this note, the document illustrates one way to link the C compiled code with R using R function called .C. The use of the .C interface is quite simple and has been explained with the help of examples. The code for examples have been developed in C and various examples shows its execution from R. It is assumed that you have some prior knowledge of C programming and acquaintance with the basics of R. The code discussed in this document should work with any unix installation of R. There is also a PDF manual called Writing R Extensions vailable from the CRAN website. The manual describes other interfaces like .Call and .External which are more complicated to use but certainly more powerful. The following document explains briefly the .C interface.
Denis Gillet, Juan Carlos Farah, Adrian Christian Holzer, Abdessalam Ouaazki
Matthias Finger, Qian Wang, Yiming Li, Varun Sharma, Konstantin Androsov, Jan Steggemann, Xin Chen, Rakesh Chawla, Matteo Galli, Jian Wang, João Miguel das Neves Duarte, Tagir Aushev, Matthias Wolf, Yi Zhang, Tian Cheng, Yixing Chen, Werner Lustermann, Andromachi Tsirou, Alexis Kalogeropoulos, Andrea Rizzi, Ioannis Papadopoulos, Paolo Ronchese, Hua Zhang, Leonardo Cristella, Siyuan Wang, Tao Huang, David Vannerom, Michele Bianco, Sebastiana Gianì, Sun Hee Kim, Davide Di Croce, Kun Shi, Abhisek Datta, Jian Zhao, Federica Legger, Gabriele Grosso, Anna Mascellani, Ji Hyun Kim, Donghyun Kim, Zheng Wang, Sanjeev Kumar, Wei Li, Yong Yang, Ajay Kumar, Ashish Sharma, Georgios Anagnostou, Joao Varela, Csaba Hajdu, Muhammad Ahmad, Ekaterina Kuznetsova, Ioannis Evangelou, Milos Dordevic, Meng Xiao, Sourav Sen, Xiao Wang, Kai Yi, Jing Li, Rajat Gupta, Hui Wang, Seungkyu Ha, Pratyush Das, Anton Petrov, Xin Sun, Valérie Scheurer, Muhammad Ansar Iqbal, Lukas Layer