Skip to contents

Assign quality control flags to values less than or equal to the minimum level of quantification but greater than the MDL.

Usage

assign_detection_flags(data, limits = imdccal::detection_limits)

Arguments

data

The "data" table produced by read_ccal() after duplicates have been removed with remove_ccal_duplicates().

limits

Table with detection limits. By default, uses the version in the package. User-defined versions must have the same columns.

Value

The input data with the addition of a new flag field. The only flag included in this routine is the J-R flag. Any other flags will need to be defined separately by the user.

Examples

tidy_ccal_flagged <- read_ccal(use_example_data(file_names = "SPAC_080199.xlsx"))[[1]][[1]] %>%
  remove_ccal_duplicates() %>%
  assign_detection_flags()
#> Reading data from /home/runner/work/_temp/Library/imdccal/extdata/SPAC_080199.x…
#> Warning: ! Questionable results contain duplicate rows:
#> ! See samples: 11: TDN, 13: TDN, and 3: TDN.
#>  This may be caused by lab error, or may be a result of one analyte being
#>   compared to more than one other analyte.
#>  See the `questionable` table returned by this function.