

Using rnorm() for generating a normal distributed random number 3. # histogram of the numbers to verify the distribution # using a different mean and standard deviation In addition, mean and SD (Standard deviation) can be specified arguments. First, we will require to specify the number required to be generated. Where mean is 0 and the standard deviation is 1. To generate numbers from a normal distribution rnorm() is used. # Generating integers without replacement # To get 5 uniformly distributed Random Numbers In addition, the range of the distribution can be specified using the max and min argument. To generate uniformly distributed random number runif() is used.

In the next section we will see different functions like runif(), rnorm(), rbinom() and rexp() to generate random numbers. There are in-built functions in R to generate a set of random numbers from standard distributions like normal, uniform, binomial distributions, etc. Set.seed(12) # random number will generate from 12 TenRandomNumbers <- sort(sample.int(100, 10)) Set.seed(5) # random number will generate from 5
