However, note that if you run rnorm(5) twice, it gives different results: set.seed(1) If you execute the previous code, you will obtain the same output.
Run again the previous example where we sampled five random numbers from a Normal distribution, but now specify a seed before: # Specify any integer If the seed is not specified, R uses the clock of the system to establish one.It is a vector of integers which length depends on the generator.
The state of the random number generator is stored in.The purpose of the R set.seed function is to allow you to set a seed and a generator (with the kind argument) in R.