Learn R Programming

ume (version 1.5.2)

.prepare_peaklist_columns: Ensure required peaklist columns are present

Description

Internal helper for as_peaklist() that ensures essential structural columns required for UME processing are present. Specifically:

  • If file_id is missing but a character column such as file or link_rawdata exists, file_id is generated as a unique integer per distinct value in that column.

  • If no such identifier exists, file_id := 1L is assigned.

  • Adds peak_id if missing (using .I)

  • Converts file_id to integer type

Usage

.prepare_peaklist_columns(pl)

Value

A data.table with guaranteed core columns.

Arguments

pl

A data.table representing a peaklist.