[.nmr_dataset_peak_table {AlpsNMR} | R Documentation

## Extract parts of an nmr_dataset_peak_table

### Description

Extract parts of an nmr_dataset_peak_table

### Usage

    ## S3 method for class 'nmr_dataset_peak_table'
    x[i]

### Arguments

`x` | an nmr_dataset_peak_table object
`i` | indices of the samples to keep

### Value

an nmr_dataset_peak_table with the extracted samples

### See Also

Other subsetting functions: `[.nmr_dataset_1D()`, `[.nmr_dataset()`, `filter.nmr_dataset_family()`, `nmr_pca_outliers_filter()`

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

### Examples

    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)
    new[0]

[Package AlpsNMR version 3.2.3 Index]