Skip to content
Prev 343461 / 398525 Next

Where to find source of C_pbinom?

Dear Sarah, Dear David,

thanks for helping. I know the FAQ and I know the R News article, but
I still couldn't figure it out. First, pbinom calls
.External(C_pbinom,...). Grepping for C_pbinom reveals... nothing
(except the appearance in .External). Going to ./src/main/names.c
reveals "{"pbinom", do_math3, 5, 11, 3+2, {PP_FUNCALL, PREC_FN, 0}},",
so the next step is to grep for do_math3 (which also applies for
"dbeta", "pbeta",..., "qnbinom_mu"). There is a connection to pbinom
again in ./src/main/arithmetic.c (SEXP attribute_hidden do_math3):
Math3_2(args, pbinom) is called. src/library/stats/src/distn.c then
shows that "Math3_2(args, pbinom)" is called. Since we just already
grepped for Math3_2, the trip ends here.

So how can one find the source code of pbinom() in this case?

Cheers,

Marius
On Wed, Aug 27, 2014 at 7:28 AM, Sarah Goslee <sarah.goslee at gmail.com> wrote: