I'm new to R and I'm looking through a book called "Discovering Statistics using R".
Although the book implies you don't need any statistical background, some of the content isn't covered/explained...
I'm wondering how you simulate a random vector a with 200 elements from the uniform distribution on the interval (-50, 50).
Maybe I'm unsure because of the terminology used. For the example I just created a vector with 200 elements that range inbetween -50 and 50... I'm just checking if this is correct.
Or is there a function that generates random values like there is in Java? I haven't found anything on google either regarding R providing random values.
runif(200, -50, 50)
会成功的
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.