Q. Which of the following R code generate a uniform random number?
β
Correct Answer: (A)
x <- runif(1, 0, 10)
if(x > 3) {
y <- 10
} else {
y <- 0
}
You must be Logged in to update hint/solution