[Rd] R binomial RNG stuck at 1 via Fortran call

Gilles GUILLOT gilles.guillot at inapg.inra.fr
Wed Nov 30 11:00:47 CET 2005


wrapper now as part as the message, 
sorry about previous mail

#include <R.h>
#include <Rmath.h>


void F77_SUB(rndstart)(void) 
{ GetRNGstate(); }

void F77_SUB(rndend)(void) 
{ PutRNGstate(); }

double F77_SUB(ggrnorm)(double *mu, double *sigma) 
{ return rnorm(*mu, *sigma); }

double F77_SUB(ggrexp)(double *scale)
{return rexp(*scale);}

double F77_SUB(ggrgam)(double *a, double *scale)
{return rgamma(*a, *scale);}

double F77_SUB(ggrunif)(double *a, double *b)
{return runif(*a, *b);}

double F77_SUB(ggrbinom)(double *n, double *p)
{return rbinom(*n, *p);}

double F77_SUB(ggrpois)(double *lambda)
{return rpois(*lambda);}



More information about the R-devel mailing list