Dear there,

Here is a snipped code,

> rm(list = ls())
> x <- 123
> save.image("abc.RData")
> rm(list = ls())
> load("abc.RData")
> sample(10)
 [1]  3  7  4  6 10  2  5  9  8  1
> rm(list = ls())
> load("abc.RData")
> sample(10)
 [1]  3  7  4  6 10  2  5  9  8  1

you will see that, after loading a abc.RData file that is saved by save.image(), sample(10) gives the same results. I am wondering whether it's designed purposely. And if it is, how can I get a different results of sample(10) every time after loading the saved image?

Any help will be really appreciated. Thanks in advance.

Best,
Jinsong

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to