search for: normrnd

Displaying 4 results from an estimated 4 matches for "normrnd".

2005 Jun 14
3
Calling C from Fortran
I would like to call C routines from Fortran under linux as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand the purpose of this C wrapper: #include <R.h> void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(normrnd)(void...
2005 Jun 14
1
Calling C from Fortran
I would like to call C routines from Fortran as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand the purpose of this C wrapper: #include <R.h> void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(normrnd)(void...
2009 Dec 29
2
how can I use R functions in Fortran 90
Hi all, Is there a way that I can import R functions into Fortran? Especially, I want to generate random numbers from some not-so-common distributions (e.g. inverted chi square) but did not find any routines written in Fortran that deal with distributions other than uniform and normal. Thanks. Anny [[alternative HTML version deleted]]
2009 Jan 15
2
Interface to open source Reporting tools
...> preventing ppl calling the .c and the .f file the same base name > (causing "multiple definitions of symbol") I suggest that the docu > should provide file names for the two example programs, e.g.: > > frand.f: > > subroutine testit() > double precision normrnd, x > call rndstart() > x = normrnd() > call dblepr("X was", 5, x, 1) > call rndend() > end > > frand-helper.c: > > #include <R.h> > > /* Fortran */ > void F77_SUB(rndstart)(void) { GetRNGstate(); } > void F77_SUB(rndend...