Generating a vector of values which sum to one but the elements should be approximately but NOT exactly uniform
Suppose I want to make a vector of length N. My goal is to ensure that all the elements are approximately 1/N (but not all elements should be exactly 1/N) and the sum of the vector should equal to one. Is there a way to do this in R?
Aucun commentaire:
Enregistrer un commentaire