dataset_from_peaks: Create a dataset from peak lists

dataset_from_peaksR Documentation

Create a dataset from peak lists

Description

Merges equivalent peaks across samples, extracts intensities, and creates a dataset object in standard package format.

Usage

dataset_from_peaks(
  sample.list,
  metadata = NULL,
  description = "",
  type = "nmr-peaks"
)

Arguments

sample.list

A named list of peak tables, one per sample.

metadata

Optional sample metadata.

description

Character string with a dataset description.

type

Character string describing the dataset type.

Value

A dataset object created from the input peak lists.

Examples

sample.list <- list(
  s1 = data.frame(ppm = c(1.0, 2.0), int = c(10, 20)),
  s2 = data.frame(ppm = c(1.0, 3.0), int = c(15, 30))
)
metadata <- data.frame(class = c("A", "B"), row.names = c("s1", "s2"))
dataset <- dataset_from_peaks(sample.list, metadata = metadata)
class(dataset)


specmine documentation built on Aug. 5, 2026, 5:06 p.m.