Faheem,
I was out last night at the local R user group, so sorry it took four mails
for a reply.
When I play with your code example, as well as the test.c example from the
r-mathlib package, I get it to work easily if I just change the seed:
edd@max:/tmp$ cat faheem.cpp
#define MATHLIB_STANDALONE
#include <Rmath.h>
#include <iostream>
using std::cout;
using std::endl;
int main(void)
{
set_seed(123, 456);
cout << "one gamme " << rgamma(1, 1) << endl;
//cout << "one normal " << norm_rand() << endl;
}
edd@max:/tmp$ g++ -o faheem faheem.cpp -lRmath
edd@max:/tmp$ ./faheem
one gamme 0.314001
edd@max:/tmp$
Could it be as simple as the RNG being unable to use (0,0) as a seed?
Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]