Rounding

Getting a random number

runif generates random numbers between 0 and 1.
The first argument specifies how many numbers you want.

runif(2)

[1] 0.8379240 0.1773677

The "unif" part of the function indicates that the numbers are uniformly distributed:
This isn't completely uniform at the sides because of our use of round. A round to 0 only happens between 0 and 0.5 because we don't have negative numbers.