[R] Interface R and C - windows

ElisabeteFernandes ebfernandes at fc.ul.pt
Mon Jul 2 12:53:01 CEST 2007


I want use the interface between R and C.  I usually work in windows.

I installed the Rtools.exe and ActivePerl 5.8.8 in the path  C:\R\R-2.3.1 like it is in the Appendix F the windows tools (Manual).  However, I do not have sucess. How should I do this ? Which type of path should I use?
Other question is about how compiling C code using the Dev-C++ and librarys of packages R. For example, I want use the function dnorm and I include in compiler options the library Rmath.h and dnorm.c:
#include <stdio.h> 
#include <Rmath.h>
#include <dnorm.c>

           int a, b, s;
           printf("Introduza um número:\n");
           scanf("%d", &a);
           printf("Introduza outro número:\n");
           scanf("%d", &b);
           s = a + b;
           printf("A densidade de %d com %d dá %d\n", a, b, s);

However, this code do not work. 


the best regard

 Elisabete Fernandes

More information about the R-help mailing list