I was creating some random samples and plotting them and noticed a strange behavior. Sampled values were different after loading ggplot2:
set.seed(111)
library(ggplot2)
sample(1:10, 10)
# [1] 8 4 5 3 7 1 6 2 10 9
set.seed(111)
sample(1:10, 10)
# [1] 6 7 3 4 8 10 1 2 9 5
I can avoid this behavior easily enough, but is there any reason for ggplot2 to change the seed value?
ggplot2
was doing something (repeatable) with the random seed. Experiments are always good :-) – Subtitle