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: [EMAIL PROTECTED] -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de Paul Gilbert Envoye : mardi 14 janvier 2003 16:45 A : [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] 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. ______________________________________________ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
