I have a list of random numbers.
x=sample(1:1000, 3)
Is there a simple way to get a list of range values in which each element falls in?
id=seq(1, 1000, by=50)
[1] 1 51 101 151 201 251 301 351 401 451 501 551
[13] 601 651 701 751 801 851 901 951
eg.
x
[1] 637 374 68
distribution
[1] "601~650" "351~400" "51~100"