Learn R Programming

ume (version 1.5.2)

.as_peaklist_from_numeric: Convert numeric m/z vector into minimal peaklist

Description

Converts a simple numeric vector containing m/z values into a minimal UME peaklist. This is useful when users want to perform direct formula assignment on a single spectrum represented only by m/z values.

The generated peaklist contains:

  • mz (copied from input)

  • i_magnitude (set to 1 for all peaks)

  • file_id = 1L

A "col_history" attribute is added to track that the object was constructed from a numeric vector.

Usage

.as_peaklist_from_numeric(x)

Value

A minimal peaklist as a data.table.

Arguments

x

Numeric vector of m/z values.

See Also

Other peaklist helpers: .filter_peaklist_basic(), .load_peaklist_file()