Re: [R] calling c function from R

2012-11-27 Thread Berend Hasselman
On 27-11-2012, at 17:21, Li Shangru wrote: > Hello > > I want to call C function from R. I follow the instruction below using the > example of foo.c > http://www.stat.umn.edu/~charlie/rc/ > > I saved the foo.c in my work directory. Then I entered the command > > R CMD SHLIB foo.c , I got the f

[R] calling c function from R

2012-11-27 Thread Li Shangru
Hello I want to call C function from R. I follow the instruction below using the example of foo.c http://www.stat.umn.edu/~charlie/rc/ I saved the foo.c in my work directory. Then I entered the command R CMD SHLIB foo.c , I got the following message Error: unexpected symbol in "R CMD" How d

Re: [R] calling C function from R

2008-05-29 Thread Uwe Ligges
What you have sent is almost unreadable. Please do not send HTML messages (as the posting guide suggests)! Wen-Ching Lin wrote: Hi, I am reading the source code of rpart. I have problems understand the following code and would appreciate for any helps. In rpart.s, there is a line: rpfit <- .

[R] calling C function from R

2008-05-28 Thread Wen-Ching Lin
Hi, I am reading the source code of rpart. I have problems understand the following code and would appreciate for any helps. In rpart.s, there is a line: rpfit <- .C(C_s_to_rp,             n = as.integer(nobs),             nvarx = as.integer(nvar),             ncat = as.integer(cats* !isord),