Dear all, is it possible to extract the seed that was used for some random number generation? For example suppose I draw a random sample of size 1000 from a normal population : rnorm(1000) Now I want to know what seed R used for that sample generation. Any way out? Thanks and regards, -- View this message in context: http://www.nabble.com/Seed-of-Random-number-generation-tp23342886p23342886.html Sent from the R help mailing list archive at Nabble.com.
RON70 wrote:> > Dear all, is it possible to extract the seed that was used for some random > number generation? For example suppose I draw a random sample of size 1000 > from a normal population : > > rnorm(1000) > > Now I want to know what seed R used for that sample generation. Any way > out? > > Thanks and regards, >I believe R creates a random seed after a random number generation function such as rnorm is called. The seed is stored in the vector .Random.seed . See ?RNG for more info on how to load, save and tweak the random seed. ----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/Seed-of-Random-number-generation-tp23342886p23342890.html Sent from the R help mailing list archive at Nabble.com.
cls59 wrote:> > RON70 wrote: >> Dear all, is it possible to extract the seed that was used for some random >> number generation? For example suppose I draw a random sample of size 1000 >> from a normal population : >> >> rnorm(1000) >> >> Now I want to know what seed R used for that sample generation. Any way >> out? >> >> Thanks and regards, >> > > I believe R creates a random seed after a random number generation function > such as rnorm is called. The seed is stored in the vector .Random.seed . > See ?RNG for more info on how to load, save and tweak the random seed.... which means that you cannot get the seed that has been used in a step before, but you can save (or set) the seed before calling rnorn(1000), of course. Uwe Ligges> ----- > Charlie Sharpsteen > Undergraduate > Environmental Resources Engineering > Humboldt State University