A function to automatically replace rounded zeroes/BDLs in a composition.
composition or dataset of compositions
vector containing the detection limits of each part
fraction of the detection limit to be used in replacement
d is given, zeroes from each column of
x are replaced by the
corresponding detection limit contained there, scaled
down by the value of
a (usually a scalar, although if
it is a vector it will be recycled with a warning). The variable
be a vector of length equal to
or a matrix of the same shape as
d=NULL, then the detection limit is extracted from the data set,
if it is available there (i.e., if there are negative numbers). If no negative
number is present in the data set, and no value is given for
result will be equal to
compositions.missings for more
details on the missing policy.
an object of the same class as
x, where all WZERO values have been replaced.
Output contains a further attribute (named
with a logical array of the same dimensions as
showing which elements were replaced (TRUE) and which were
kept unchanged (FALSE).
Aitchison, J. (1986) The Statistical Analysis of Compositional
Data Monographs on Statistics and Applied Probability. Chapman &
Hall Ltd., London (UK). 416p.
Mart\'in-Fern\'andez, J.A.; Barcel\'o-Vidal, C. and Pawlowsky-Glahn, V. (2003) Dealing With Zeros and Missing Values in Compositional Data Sets Using Nonparametric Imputation. Mathematical Geology, 35 , 253-278
1 2 3 4 5 6