[R] help needed: taking a function out of a package and it can not find some funtions

2007-11-06 Thread Jason Liao
I tried to modify the R function bw.SJ (from the stats package) for my own use. But if I just get the source code and run directly (without any modification), it can no longer find some key functions called within it. I understand this has something to do with searching path which I do not

Re: [R] help needed: taking a function out of a package and it can not find some funtions

2007-11-06 Thread Katharine Mullen
bw.SJ calls C code from the file /usr/local/bin/R-2.6.0/src/library/stats/src/bandwidths.c You have to make this code available. You can do the following: 1. copy bandwidths.c and the definition of bw.SJ (the latter renamed) to a directory 2. compile bandwidths.c into a shared library with the

Re: [R] help needed: taking a function out of a package and it can not find some funtions

2007-11-06 Thread Katharine Mullen
OK, well, the way I suggested will allow you to modify the C code too -- but reading your question I realize you probably don't want to do this. If you want to use the definitions of the C functions from stats, you can skip 2. below and add another modification to the calls to .C in your def. of