From gilles.guillot at inapg.inra.fr  Wed Nov 30 11:00:47 2005
From: gilles.guillot at inapg.inra.fr (Gilles GUILLOT)
Date: Wed, 30 Nov 2005 11:00:47 +0100
Subject: [Rd] R binomial RNG stuck at 1 via Fortran call
Message-ID: <200511301100.47545.gilles.guillot@inapg.inra.fr>

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



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