Skip to contents

Scans a data frame for columns that might contain standard names and attempts to match them to recognized standards.

Usage

auto_detect_standards(data, name_col = NULL, add_columns = TRUE)

Arguments

data

A data frame containing sample information.

name_col

Name of the column containing sample names. If NULL, attempts to auto-detect from common column names.

add_columns

Logical. If TRUE, adds matched_standard and standard_type columns to the data frame. If FALSE, returns only the matching results.

Value

If add_columns = TRUE, the original data frame with added columns. If FALSE, a tibble with matching results.

Examples

if (FALSE) { # \dontrun{
# Auto-detect and add standard columns
data <- data.frame(
  sample_name = c("PS A", "Unknown", "PMMA B"),
  signal = c(100, 200, 150)
)
auto_detect_standards(data)
} # }