Chiquoine, Ben
2010-Dec-20 20:48 UTC
[R] finding and opening C source called from R functions.
Hi,
As will soon be very clear I'm an R novice. I'm trying to better
understand the ks.test function in the stats package. When I look at the source
code there are several calls to C functions (for example .C("pkstwo",
is.integer(length(x[IND])), p=as.double(x[IND]), as.double(tol), PACKAGE =
"stats)$P). I'm wondering if there is a way to view the source code
for the underlying C functions? I googled a post which said to open ks.c to see
the source code but I can't find that file anywhere on my hard drive or on
the web. Any suggestions would be greatly appreciated.
Thanks in advance,
Ben
___________________________________________
This message and any attached documents contain
information which may be confidential, subject to
privilege or exempt from disclosure under applicable
law. These materials are solely for the use of the
intended recipient. If you are not the intended
recipient of this transmission, you are hereby
notified that any distribution, disclosure, printing,
copying, storage, modification or the taking of any
action in reliance upon this transmission is strictly
prohibited. Delivery of this message to any person
other than the intended recipient shall not
compromise or waive such confidentiality, privilege
or exemption from disclosure as to this
communication.
If you have received this communication in error,
please notify the sender immediately and delete
this message from your system.
[[alternative HTML version deleted]]
Peter Langfelder
2010-Dec-20 20:56 UTC
[R] finding and opening C source called from R functions.
On Mon, Dec 20, 2010 at 12:48 PM, Chiquoine, Ben <BChiquoine at tiff.org> wrote:> Hi, > > As will soon be very clear I'm an R novice. ?I'm trying to better understand the ks.test function in the stats package. ?When I look at the source code there are several calls to C functions (for example .C("pkstwo", is.integer(length(x[IND])), p=as.double(x[IND]), as.double(tol), PACKAGE = "stats)$P). ?I'm wondering if there is a way to view the source code for the underlying C functions? ?I googled a post which said to open ks.c to see the source code but I can't find that file anywhere on my hard drive or on the web. ?Any suggestions would be greatly appreciated.Go to cran.r-project.org, find the package stats, download the tar.gz bundle, unpack it (on a linux command line, you can type tar -xvzf stats*.tar.gz), then navigate to the directory stats/src and look at the source code in the directory.