The function to generate random numbers in R following a normal distribution is ________.
- generate_random()
- randn()
- random()
- rnorm()
The rnorm() function in R is used to generate random numbers following a normal distribution. For example, rnorm(10) would generate 10 random numbers from a standard normal distribution.
Loading...
Related Quiz
- What is a list in R?
- The syntax for a while loop in R is while (condition) { ________ }.
- To get the indices of a logical vector in R where the value is TRUE, you can use the ________ function.
- In R, the operator != is used to check if two values are ________.
- Imagine you want to concatenate a vector of numbers into a single string. What steps would you take?