is there any simple function or package to select element in the vector or list by using elements probability portions? (in R)