Re: [R] how to reproduce the same sampled units?

From: Kenneth Cabrera <krcabrer_at_une.net.co>
Date: Wed, 02 May 2007 20:15:23 -0500

?set.seed

On Wed, 02 May 2007 18:25:18 -0500, Santanu Pramanik <spramanik_at_survey.umd.edu> wrote:

> Hi all,
> Is it possible to generate the same sample number of times in R? In
> SAS, using the option "seed" it is possible to reproduce exactly the
> same sample. Is there any such feature in R which I can use?
> For further clarity,
> for (i in 1:2)
> {
> samp = sample(1:1000,100,replace = FALSE)
> print(samp)
> }
> For the above simulation, is it possible to generate the same sampled
> units twice?
> Any suggestion would be gratefully acknowledged.
> Thanks,
> Santanu
> Santanu Pramanik
> JPSM,1218J Lefrak Hall
> University of Maryland,College Park
> Phone no.-301-314-9916
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Kenneth Roy Cabrera Torres
Cel 315 504 9339

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 May 2007 - 01:23:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 May 2007 - 01:31:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.