G'day Steve,

On Tue, 20 Jul 2010 17:20:49 +0930
Steve Pederson <stephen.peder...@adelaide.edu.au> wrote:

I suggest to insert the following two lines (untested as I usually
don't work on Windows):
 
> # include <R.h>
> # include <Rmath.h>
> void test1 (double *x, double *result)
> {
        GetRNGstate();
>      result[0] = rgamma(*x, 2.0);
        PutRNGstate();
> }
> 

[...] 
> I'm running Windows XP & I followed the instructions at
> http://cran.r-project.org/doc/manuals/R-admin.html#Windows-standalone
> after building R from source.

But you didn't follow the instructions of Section 6.3 in the "Writing R
Extensions manual. :)

http://cran.r-project.org/doc/manuals/R-exts.html#Random-numbers

HTH.

Cheers,

        Berwin

========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)
School of Maths and Stats (M019)            +61 (8) 6488 3383 (self)
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: ber...@maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin

______________________________________________
R-help@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.

Reply via email to