Flexible entry point for UME. Accepts:
data.frame / data.table peaklists
numeric m/z vectors
file paths (csv, txt, tsv, rds)
Normalizes column names, adds missing structural columns (file_id, peak_id),
removes invalid rows, validates schema, and assigns the UME peaklist class.
Creates a standardized data.table ready for formula assignment.
as_peaklist(pl, verbose = FALSE, track_original_names = TRUE, ...)A validated and normalized peaklist as a data.table
with class "ume_peaklist".
Input object representing a peaklist. Can be:
data.frame or data.table
file path to a supported tabular format
numeric vector of m/z values
logical; if TRUE, show progress messages.
Logical (default: TRUE). If TRUE,
as_peaklist() stores a "original_colnames" attribute mapping
canonical UME names (e.g. "mz") to the user’s original column names
(e.g. "m/z"). Internal functions that perform many := operations
(e.g. assign_formulas()) may set this to FALSE to avoid attribute-
related shallow-copy warnings.
Reserved for future extensions.
Other check ume objects:
check_formula_library(),
check_mfd()