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]]
______________________________________________
[email protected] 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.