
Internal Helper: Encode below-the-limit-of-quantification (BLQ) values as -Inf
Source:R/var_helpers.R
var_loqcens.RdVectorized helper used in VPC pre-processing. Replaces BLQ-flagged positions
of x with -Inf. A position is BLQ when any of the following hold:
is.na(x), !is.null(loq) && x < loq, or !is.null(mdv) && mdv == 1.
Returns the modified vector — quantile computation is performed downstream.
Usage
var_loqcens(x, loq = NULL, mdv = NULL, call = rlang::caller_env())Arguments
- x
Numeric vector to encode.
- loq
Numeric scalar or vector of length
length(x)giving the lower limit of quantification, orNULL(no< loqtrigger).- mdv
Integer/logical vector of length
length(x)flagging missing-DV rows (NONMEM conventionMDV == 1), orNULL(no MDV trigger).- call
The call reported in errors.