Conversion of text representing a number, but possibly starting with "<" or ">" to indicate that the number exceeds the detection limit of an analysis method, to a valid number
Usage
hsLabValToVal_old(
x,
country,
detLimFactorBelow = 0.5,
detLimFactorAbove = 2,
stopOnError = TRUE
)
Arguments
- x
(vector of) character(s) representing values, possibly starting with "<" or ">" to indicate detection limit exceedance
- country
"en" if value is given in English format (decimal point ".", thousands separator ",") or "de" if value is given in German format (decimal point ",", thousands separator ".").
- detLimFactorBelow
factor by which detection limit is multiplied in order to get a valid value when the value was below the detection limit. Default value: 0.5
- detLimFactorAbove
factor by which detection limit is multiplied in order to get a valid value when the value was above the detection limit. Default value: 2
- stopOnError
if TRUE, the program stops on conversion errors, otherwise shows a warning
Value
data frame with columns outOfLimit being one of "" (value within detection limits), "<" (value below detection limit) or ">" (value above detection limit) and numericValue containing the value which, in case of detection limit exceedance, may be a substitute value. If there were conversion errors, the column numericValue containing the indices of the wrongly formatted values in its attribute "errorIndices".