[R] Where to find the source codes for the internal function in stats package

Felix Andrews felix at nfrac.org
Sat Jan 17 09:38:40 CET 2009


I guess you have the binary distribution, not the R source code.

The functions you want seem to be defined in the files dchisq.c and dnchisq.c in
https://svn.r-project.org/R/trunk/src/nmath/



2009/1/17 zhijie zhang <rusers.sh at gmail.com>:
> Dear all,
>  I want to see the source codes for "dchisq(x, df, ncp=0, log = FALSE)",
> but cannot find it.
> I input "dchisq" in the R interface, and then enter, the following message
> return:
>> dchisq
> /*****************************************************/
> function (x, df, ncp = 0, log = FALSE)
> {
>    if (missing(ncp))
>        .Internal(dchisq(x, df, log))
>    else .Internal(dnchisq(x, df, ncp, log))
> }
> <environment: namespace:stats>
> /*****************************************************/
>  It seems that dchisq() is the internal function in STATS package. So go
> to "C:\Program Files\R\R-2.7.2\library\stats" to look for it. I browsed the
> files in this catalog, but it seems that i missed it.
> Anybody can tell me how and where to find the codes, Thanks a lot.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Felix Andrews / 安福立
http://www.neurofractal.org/felix/
3358 543D AAC6 22C2 D336  80D9 360B 72DD 3E4C F5D8




More information about the R-help mailing list