Store the results of your computation as an object using the left arrow <-
The convention we will use in this unit is snake_case, where we separate multiple words by an underscore, and use all lower case. The most important thing though is to be consistent with your names.
How could you use it to ensure you get the same random numbers?
using same seed
You may have noticed the numbers you generated at your R console are different from the ones presented earlier. Why is that?
i don’t use seed before
r
1999 * 2 / 1000 (39 + 13 + 2) / 4 cos(pi)
r
# 生成10个0-1的随机数 runif(n = 10, min = 0, max = 1) # 生成10个0-10的随机数 runif(10, min = 0, max = 10) # 生成10个0-1的随机数,存入y y <- runif(10, min = 0, max = 10) # print y y