This function removes zeros from a simplex (a matrix or vector where each row sums to one and all elements are between 0 and 1) using a specified method.
Arguments
- simplex
A numeric matrix, data frame, or vector representing the simplex. Each row should sum to one and all elements should be between 0 and 1.
- method
A character string specifying the method to remove zeros. Currently, only "rescaling" is supported. Default is "rescaling".
- padding
A numeric value to add to each element of the simplex when using the "rescaling" method. Default is 0.01.
Value
A numeric matrix with the same dimensions as the input simplex
, with zeros removed according to the specified method.