The project I am working on now borrows the C source code in an R package. I
just made some changes according to the requirement of our project. The
problem is that how I can run the C code in R after I have changed it? The
online help says that they strongly encourage people do it through create an
R package. I really hope that I can avoid that since I am quite sure that
it will take me a while to learn how to create an R package..
Is there any other way that I can run the C code in R?
Loo
b********p 发帖数: 875
2
R CMD SHLIB a.c
F****r 发帖数: 151
3
谢谢楼上。 核心步骤就是 R CMD SHLIB a.c
DUMMY 级详细步骤如下(牛人可直接飘过):
WindowXP 系统, R 2.7.1 已经下载安装 在c:文件路径c:\R
1.从http://www.murdoch-sutherland.com/Rtools/下载安装Rtools28.exe ,存为c:\Rtools
2.在MS-DOS的prompt下,把路径改为 c:\R\bin
3.在c:\R\bin>后输入路径
PATH=c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin;c:\texmf\miktex\
bin;c:\progra~1\htmhe~1;c:\R\bin;c:\windows;c:\windows\system32
注意你的路径可能会不同,要因人制宜。 参考 page 54 Appendix E of R
Installation and Administration , 尤其注意以下两段:
First:
Your PATH may include ‘.’ first, then the ‘bi