[R] [R]Summary: Random number generator in R compared to S

Alain LE TERTRE a.letertre at invs.sante.fr
Wed Jan 15 09:47:03 CET 2003

Thanks to tom blackwell and Paul Gilbert for the help on my question below.
Tom suggested using a system command in S to run R  (using a batch file),
apply the functions, generate output in a file readable in S.
Paul suggested to use his function to generate random number in S with the
same random number generator used in R (see his syskern package).
thanks again

O__ ---- Alain Le Tertre
 c/ /'_ --- Institut de Veille Sanitaire (InVS)
(*) \(*) -- 12 rue du val d'Osne
~~~~~~~~~~ - 94415 Saint Maurice cedex FRANCE
Voice: 33 1 41 79 67 50 Fax: 33 1 41 79 67 68
email: a.letertre at invs.sante.fr

-----Message d'origine-----
De : r-help-admin at stat.math.ethz.ch
[mailto:r-help-admin at stat.math.ethz.ch]De la part de Paul Gilbert
Envoye : mardi 14 janvier 2003 16:45
A : a.letertre at invs.sante.fr
Cc : r-help at stat.math.ethz.ch
Objet : Re: [R] Random number generator in R compared to S

Alain LE TERTRE wrote:
> I'm doing some simulations for which i need to use both S-plus and R.
> I generate in S+ some random normal distributions to define one dataset by
> iteration.  I need to use the same dataset generated in S-plus in R.
> I was first thinking to generate in R the same dataset by using the same
> random number generator with a fixed seed. But It seems that S-plus and R
> don't use the same random number generator.
> So my question is: Is there a way to pass dynamically dataset generated in
> S-plus to R, run a command, extract results, and pass them back to S-plus?
> Or is it more efficient to generate all the datasets in S-plus and export
> them to R?
> Or anything else?
> Any hints will be greatly appreciated.

More information about the R-help mailing list