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

From: Gilles GUILLOT <gilles.guillot_at_inapg.inra.fr>
Date: Wed 30 Nov 2005 - 10:00:47 GMT


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);}



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 30 21:14:34 2005

This archive was generated by hypermail 2.1.8 : Wed 30 Nov 2005 - 14:21:23 GMT