Use "set.seed()"
--------------------------------------
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
"Is the room still a room when its empty? Does the room,
the thing itself have purpose? Or do we, what's the word... imbue it."
- Jubal Early, Firefly
From:
Xiaoxi Gao <[email protected]>
To:
R Help <[email protected]>
Date:
11/08/2010 03:59 PM
Subject:
[R] Random Sample
Sent by:
[email protected]
Hello R users,
Here is my question about generating random sample. How to set the random
seed to recreate the same random numbers? For example, 10 random numbers
is generated from N(0,1), then "runif(10)" is used.What if I want to get
the same 10 random numbers when I run runif(10) again? Is it possible?I
think .Random.seed should be used here.
Thanks.
Xiaoxi
[[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.
[[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.