Sample a proportion of indices of a vector
p_indices(x, p)
A vector
A numeric probability between 0 and 1
An integer vector of indices.