new_nmr_dataset | R Documentation |
Create an nmr_dataset object
new_nmr_dataset(metadata, data_fields, axis)
metadata |
A named list of data frames |
data_fields |
A named list. Check the examples |
axis |
A list. Check the examples |
Create an nmr_dataset object
Create an nmr_dataset object
Other class helper functions:
format.nmr_dataset()
,
format.nmr_dataset_1D()
,
format.nmr_dataset_peak_table()
,
is.nmr_dataset_1D()
,
is.nmr_dataset_peak_table()
,
new_nmr_dataset_1D()
,
new_nmr_dataset_peak_table()
,
print.nmr_dataset()
,
print.nmr_dataset_1D()
,
print.nmr_dataset_peak_table()
,
validate_nmr_dataset()
,
validate_nmr_dataset_family()
,
validate_nmr_dataset_peak_table()
#
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.