[R] Question about calling C function from R

Liaw, Andy andy_liaw at merck.com
Fri Oct 22 00:02:34 CEST 2004


> From: Zhu Chao
> 
> Hi,all
> 
> I wrote a C function and now I want to plug in this in R. I 
> know how to do 
> this in Unix version R by typing something like "R CMD SHLIB 
> foo.c" to 
> compile this C code. Then I can load it by using dyn.load. 
> But I don't know 
> how to do it in a windows version R. Anyone can help me out 
> here? I really 
> appreciate.

It's essentially the same, except you load the .dll file, rather than the
.so.  However, before you can do that, you need to follow the direction in
README.packages and install the tools and compilers mentioned there.

Andy
 
> Thanks a lot!
> 
> Chao
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list