Re: [R] fortran random number

2013-08-04 Thread Simon Zehnder
Hi Filippo, I would advice you to use the RcppArmadillo package - maybe in combination with the inline package. It is extremely fast and very flexible. A simple RNGScope() lets you take the RNG from R. I myself programmed an MCMC sampler with this package and it is much faster, than the one I h

Re: [R] fortran random number

2013-08-04 Thread Prof Brian Ripley
On 04/08/2013 21:38, Filippo wrote: Hi, I need an advice. I'm writing a Markov Chain Monte Carlo subroutine in F95 which should be called from R. I noticed that the subroutine RANDOM_NUMBER takes the seed from R (is that correct?). It is not correct. I was wondering if is better initialize th

[R] fortran random number

2013-08-04 Thread Filippo
Hi, I need an advice. I'm writing a Markov Chain Monte Carlo subroutine in F95 which should be called from R. I noticed that the subroutine RANDOM_NUMBER takes the seed from R (is that correct?). I was wondering if is better initialize the random seed inside the F95 subroutine or use the R seed