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)
will do the trick.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments