rnorm() draws random numbers from a normal distribution, here 1000 samples with mean 50 and standard deviation 10. summary() then reports its min, quartiles, mean, and max. The sample mean and median should land near 50 for a large draw. Set a seed with set.seed(42) first to make the random draw reproducible.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.