[R] packages which call functions which run C code...
Peter Langfelder
peter.langfelder at gmail.com
Fri Jun 24 02:36:22 CEST 2011
On Thu, Jun 23, 2011 at 4:46 PM, Steven Wolf <wolfste4 at msu.edu> wrote:
> I am looking at the function ks.test in the stats package and trying to
> figure out why it gives a different result for a p-value than does the
> corresponding function in MATLAB. I am hoping for one of two responses:
>
>
>
> 1. You know about ks.tests and have a familiarity with both the R and
> MATLAB algorithms and can tell me why this should be happening.
>
> 2. You know where I can find the C code so that I can decipher it.
You can download the source R bundle (a .tar.gz or tar.bz, for example
http://cran.stat.ucla.edu/src/base/R-2/R-2.13.0.tar.gz), unpack it,
then navigate to the R source directory, go to subdirectory
src/library/stats/src and look at the file ks.c. The R function
ks.test is defined in src/library/stats/R/ks.test.R.
HTH,
Peter
More information about the R-help
mailing list