new_nmr_dataset_peak_table: Creates a new nmr_dataset_peak_table object from scratch

Description Usage Arguments Value See Also Examples

View source: R/nmr_dataset_peak_table.R

Description

Creates a new nmr_dataset_peak_table object from scratch

Usage

1
new_nmr_dataset_peak_table(peak_table, metadata)

Arguments

peak_table

A numeric matrix with one NMR spectrum on each row

metadata

A list of data frames with at least the NMRExperiment column

Value

Creates a new nmr_dataset_peak_table object from scratch

See Also

Other nmr_dataset_peak_table functions: [.nmr_dataset_peak_table(), format.nmr_dataset_peak_table(), is.nmr_dataset_peak_table(), load_and_save_functions, nmr_meta_add(), nmr_meta_export(), nmr_meta_get_column(), nmr_meta_get(), print.nmr_dataset_peak_table(), validate_nmr_dataset_peak_table()

Other class helper functions: format.nmr_dataset_1D(), format.nmr_dataset_peak_table(), format.nmr_dataset(), is.nmr_dataset_1D(), is.nmr_dataset_peak_table(), new_nmr_dataset_1D(), new_nmr_dataset(), print.nmr_dataset_1D(), print.nmr_dataset_peak_table(), print.nmr_dataset(), validate_nmr_dataset_family(), validate_nmr_dataset_peak_table(), validate_nmr_dataset()

Examples

1
2
3
4
5
6
7
8
9
dir_to_demo_dataset <- system.file("dataset-demo", package = "AlpsNMR")
dataset <- nmr_read_samples_dir(dir_to_demo_dataset)
dataset_1D <- nmr_interpolate_1D(dataset, axis = c(min = -0.5, max = 10, by = 2.3E-4))
meta <- file.path(dir_to_demo_dataset, "dummy_metadata.xlsx")
metadata <- readxl::read_excel(meta, sheet = 1)
dataset_1D <- nmr_meta_add(dataset_1D, metadata = metadata, by = "NMRExperiment")
metadata <- list(external = dataset_1D[["metadata"]][["external"]])
peak_table <- nmr_data(dataset_1D)
new <- new_nmr_dataset_peak_table(peak_table, metadata)

AlpsNMR documentation built on April 1, 2021, 6:02 p.m.