R/utils.R
to_simplex.Rd
Normalize vector to a simplex
to_simplex(vector)
numeric vector
vector whose entries sum to 1
to_simplex(c(1, 1, 1)) #> [1] 0.3333333 0.3333333 0.3333333