nmr_assign_bins: Assign compound classes using the chosen binset

View source: R/1-functions_processing.R

nmr_assign_binsR Documentation

Assign compound classes using the chosen binset

Description

Assign group (bin name) to each row of the data based on the ppm column.

Usage

nmr_assign_bins(dat, binset)

Arguments

dat

Input dataframe. This could be spectral data, or peak picked data. Must include a 'ppm' column for compound class assignment

binset

A binset; e.g. bins_Clemente2012, bins_Hertkorn2013, etc., or a similarly-structured data frame

Value

The input data with a new group column whose entries are drawn from the binset. Entries will be NA if a ppm value does not fall into any group.

Author(s)

Kaizad Patel

Examples

sdir <- system.file("extdata", "kfp_hysteresis", "spectra_mnova", package = "nmrrr")
spec <- nmr_import_spectra(path = sdir, method = "mnova")
nmr_assign_bins(spec, bins_Clemente2012)

bpbond/nmrrr documentation built on Aug. 26, 2023, 6:53 p.m.