May 2019
Beginner to intermediate
266 pages
5h 57m
English
rnorm() generates a random value from the normal distribution with the standard syntax specified as follows:
rnorm(n, mean = , sd = )
This is used to generate n number of normal random numbers with the argument's mean and sd. For our dataset, we can execute the following command to observe the probability curve:
> p4 <- ggplot(data = Iris, aes(PetalWidthCm)) ++ stat_function(fun = rnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") ++ scale_y_continuous(breaks = NULL)> p4
From this, we get the following plot:

Let's now look at box plots.
Read now
Unlock full access