[R] modify functions in stats, but .Call(C_BinDist, ...) couldn't load C function

2013-11-15 Thread dan wang
Hi all, I am trying to write a new function based on an existing function in stats. This function requires to call a c program C_BinDist. The new function couldn't work without load this c script. How can I find this C_BinDist function and load it to make my new function work through? Thanks,

Re: [R] modify functions in stats, but .Call(C_BinDist, ...) couldn't load C function

2013-11-15 Thread Rui Barradas
Hello, If your C function is in a shared library, take a look at ?dyn.load. Hope this helps, Rui Barradas Em 15-11-2013 14:34, dan wang escreveu: Hi all, I am trying to write a new function based on an existing function in stats. This function requires to call a c program C_BinDist. The

Re: [R] modify functions in stats, but .Call(C_BinDist, ...) couldn't load C function

2013-11-15 Thread dan wang
This C function is in library stats. It seems dyn.load(C_BinDist) is not working. Thanks. On Fri, Nov 15, 2013 at 10:48 AM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, If your C function is in a shared library, take a look at ?dyn.load. Hope this helps, Rui Barradas Em 15-11-2013

Re: [R] modify functions in stats, but .Call(C_BinDist, ...) couldn't load C function

2013-11-15 Thread Prof Brian Ripley
On 15/11/2013 14:34, dan wang wrote: Hi all, I am trying to write a new function based on an existing function in stats. This function requires to call a c program C_BinDist. The new function couldn't work without load this c script. How can I find this C_BinDist function and load it to make

Re: [R] modify functions in stats, but .Call(C_BinDist, ...) couldn't load C function

2013-11-15 Thread dan wang
Thanks, that works!! On Fri, Nov 15, 2013 at 11:16 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: On 15/11/2013 16:11, dan wang wrote: Thanks, I think you are right.. How can I access this object? fortunes::fortune(14) applies. Thanks, Dan On Fri, Nov 15, 2013 at 11:04 AM,