# it generates a vector of 2 elements whose components are randomly
# chosen from 1..10
random.component.selection(d = 2, d.original = 10)
# it generates a vector of 10 elements whose components are randomly
# chosen from 1..1000
random.component.selection(d = 10, d.original = 1000)
Run the code above in your browser using DataLab