I need to generate random numbers from 20 to 50 in 5 increments. For example, the numbers should be 20, 25, 30, 25, 50, 45, etc. The difference between the numbers should be 5.
I tried this:
x<-floor(runif(50,20,50))
this gives me any number from 20 to 50. Is there an easy way to do this in R?
source share