random numbers
Random Numbers and Seeds in R
To explore how R generates randome numbers, we will use the rnorm function. This function draws a random number from a normal distribution with a mean = 0 and standard deviation = 1 (though these can be changed with the mean and sd parameters). With n = 1 we will get two random numbers. rnorm(n = 1) ## [1] -0.4207432 rnorm(n = 1) ## [1] -1.363858 Each time you run the command you will get a different number. »