a<-c(1,2,0,7,5)
Some languages have a picker -function -- choose one random number from a
-- how in R?
Read this article about generating random numbers in R.
http://blog.revolutionanalytics.com/2009/02/how-to-choose-a-random-number-in-r.html
You can use sample
in this case
sample(a, 1)
Second attribute is showing that you want to get only one random number.
To generate number between some range runif
function is useful.