read_in: Import 1D NMR spectra

View source: R/read_in.R

read_inR Documentation

Import 1D NMR spectra

Description

Import 1D NMR spectra

Usage

read_in(
  path,
  exp_type = list(exp = c("PROF_PLASMA_CPMG")),
  n_max = 1000,
  filter = TRUE,
  recursive = TRUE,
  verbose = TRUE,
  n_spec = "multiple"
)

Arguments

path

char, path to file directory containing spectra

exp_type

named list, filter for acquisition parameters of experiments to read-in (see Details)

n_max

int, maximum number of experiments to read-in

filter

logic, remove experiments with incomplete file systems (TRUE is recommended)

recursive

logic, if TRUE recursively search all subfolders of path for specified NMR files

verbose

num, different verbose levels: 0 (no info), 1 (overview), 2 (detailed), 3 (step-by-step for debugging)

n_spec

string, the number of spectra being read in. Takes either '1' or 'multiple'.

Details

This function imports TopSpin processed NMR spectra as well as spectrometer and processing parameters found in files acqus and procs. Experiments can be filtered according to data acquisition variables using the exp_type argument: For example, to read standard 1D NMR experiments use exp_type=list(exp='noesygppr1d'). More than one argument can be provided as list element.

Value

The function exports the following three objects into the currently active R environment (no variable assignments needed):

  • X, num matrix: NMR data, spectra in rows

  • ppm, num array - chemical shift positions, length matches to columns in X

  • meta, data.frame - spectrometer metadata as extracted from individual acqus files, row-matched to X

Objects in the R environment with the same variable names will be overwritten.

NA

Author(s)

Torben Kimhofer torben.kimhofer@murdoch.edu.au

See Also

Other preproc: bl(), cali(), preproc()

Examples

read_in(path = system.file('extdata',package='concentr8r'),
        exp_type = list(exp=c("PROF_URINE_NOESY")),
        n_spec = 'multiple')

kylebario/concentr8r documentation built on Nov. 9, 2022, 12:47 a.m.