[R] c code in R

Uwe Ligges ligges at statistik.uni-dortmund.de
Sat Nov 1 15:51:34 CET 2003


solares at unsl.edu.ar wrote:

> Hi, my question is How i cant to execute c code within R for example
> name of program probe.c (in workpath of R)
> #include<stdio.h>
> void main(){
> int x;
> scanf("%d\n",&x)
> printf("%d\n",x)
> }
>  and in R i make 
> .c("probe.c")
> i'm obtain no load table simbol, but i compile the program with Borland C 
> 5.0 and obtain the .obj archive (probe.obj and the .exe).I have to make the 
> load in R?. What is wrong?, Thanks Ruben

Your mistake was that you have read neither
a) the R for Windows FAQ, Section 7.3 "How do I include compiled C 
code?", nor
b) the manual "Writing R Extensions".

Uwe Ligges




More information about the R-help mailing list