This function scans a vector of semicolon-delimited target strings (`curve_quant`) and identifies which entries contain missing targets, indicated by the presence of `"<sample_matrix>-NA"` for each target listed in `sample_matrices`.

calcSampleTargetNAs(curve_quant, sample_matrices)

Arguments

curve_quant

A character vector where each element contains semicolon-separated target identifiers, e.g., `"R;CSF-NA"`.

sample_matrices

A character vector of sample_matrix values

Value

A two-column matrix where each row gives the (row, col) index of a match: - `row`: the index in `curve_quant` - `col`: the index in `sample_matrices` where a corresponding `"-NA"` entry was found. If no matches are found, returns an empty matrix with 0 rows and 2 columns.

Examples

curve_quant <- c("R;CSF-NA", "F", "R;PLASMA-NA")
sample_matrices <- c("CSF", "PLASMA", "SERUM")
calcSampleTargetNAs(curve_quant, sample_matrices)
#>      row col
#> [1,]   1   1
#> [2,]   3   1
#> [3,]   3   2