new_nmr_dataset: Create an nmr_dataset object

Description Usage Arguments Value See Also Examples

View source: R/nmr_dataset.R

Description

Create an nmr_dataset object

Usage

1
new_nmr_dataset(metadata, data_fields, axis)

Arguments

metadata

A named list of data frames

data_fields

A named list. Check the examples

axis

A list. Check the examples

Value

Create an nmr_dataset object

Create an nmr_dataset object

See Also

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_peak_table(), print.nmr_dataset_1D(), print.nmr_dataset_peak_table(), print.nmr_dataset(), validate_nmr_dataset_family(), validate_nmr_dataset_peak_table(), validate_nmr_dataset()

Other nmr_dataset functions: [.nmr_dataset(), format.nmr_dataset(), load_and_save_functions, nmr_interpolate_1D(), nmr_meta_add(), nmr_meta_export(), nmr_meta_get_column(), nmr_meta_get(), nmr_ppm_resolution(), nmr_read_samples(), print.nmr_dataset(), validate_nmr_dataset()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#
metadata_1D <- list(external = data.frame(NMRExperiment = c("10", "20")))
# Sample 10 and Sample 20 can have different lengths (due to different setups)
data_fields_1D <- list(data_1r = list(runif(16), runif(32)))
# Each sample has its own axis list, with one element (because this example is 1D)
axis_1D <- list(list(1:16), list(1:32))
my_1D_data <- new_nmr_dataset(metadata_1D, data_fields_1D, axis_1D)

# Example for 2D samples
metadata_2D <- list(external = data.frame(NMRExperiment = c("11", "21")))
data_fields_2D <- list(data_2rr = list(matrix(runif(16*3), nrow=16, ncol=3),
                        runif(32*3), nrow=32, ncol=3))
# Each sample has its own axis list, with one element (because this example is 1D)
axis_2D <- list(list(1:16, 1:3), list(1:32, 1:3))
my_2D_data <- new_nmr_dataset(metadata_2D, data_fields_2D, axis_2D)

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