Some languages have a picker -function -- choose one random number from a -- how in R?
To select a random element from a number of elements, you can use the sample() function as follows:
a<-c(1,2,0,7,5)> sample(a, 1) 5
> sample(a, 1)
If you want to explore more in R programming then watch this R programming tutorial for beginner: