new_nmr_dataset_1D {AlpsNMR} | R Documentation

## Creates a new 1D nmr_dataset object from scratch

### Description

Creates a new 1D nmr_dataset object from scratch

### Usage

    new_nmr_dataset_1D(ppm_axis, data_1r, metadata)

### Arguments

`ppm_axis` | A numeric vector with the ppm values for the columns of data_1r
`data_1r` | 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 1D nmr_dataset object from scratch

### 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_peak_table()`, `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()`

Other nmr_dataset_1D functions: `[.nmr_dataset_1D()`, `computes_peak_width_ppm()`, `file_lister()`, `files_to_rDolphin()`, `format.nmr_dataset_1D()`, `is.nmr_dataset_1D()`, `load_and_save_functions`, `nmr_align_find_ref()`, `nmr_baseline_removal()`, `nmr_baseline_threshold()`, `nmr_exclude_region()`, `nmr_integrate_regions()`, `nmr_interpolate_1D()`, `nmr_meta_add()`, `nmr_meta_export()`, `nmr_meta_get_column()`, `nmr_meta_get()`, `nmr_normalize()`, `nmr_pca_build_model()`, `nmr_pca_outliers_filter()`, `nmr_pca_outliers_plot()`, `nmr_pca_outliers_robust()`, `nmr_pca_outliers()`, `nmr_ppm_resolution()`, `plot.nmr_dataset_1D()`, `plot_webgl()`, `print.nmr_dataset_1D()`, `rdCV_PLS_RF_ML()`, `rdCV_PLS_RF()`, `save_files_to_rDolphin()`, `to_ChemoSpec()`, `validate_nmr_dataset_peak_table()`, `validate_nmr_dataset()`

### Examples

    # Create a random spectra matrix
    nsamp <- 12
    npoints <- 20
    dummy_ppm_axis <- seq(from = 0.2, to = 10, length.out = npoints)
    dummy_spectra_matrix <- matrix(runif(nsamp*npoints), nrow = nsamp, ncol = npoints)
    metadata <- list(external = data.frame(NMRExperiment = paste0("Sample", 1:12),
                                           DummyClass = c("a", "b"),
                                           stringsAsFactors = FALSE))
    dummy_nmr_dataset_1D <- new_nmr_dataset_1D(ppm_axis = dummy_ppm_axis,
                                               data_1r = dummy_spectra_matrix,
                                               metadata = metadata)

[Package AlpsNMR version 3.0.6 Index]