Import 1D NMR spectra

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

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

Arguments

path

char, path to file directory containing spectra

exp_type

named list, filter for acquisition paramters 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)

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.

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.

NA

See also

Author

Torben Kimhofer torben.kimhofer@murdoch.edu.au

Examples

path<-system.file('extdata/', package = 'metabom8') read1d(path, exp_type=list(pulprog='noesygppr1d'))
#> Warning: read1d` will be removed in future versions, please use `read1d_proc` instead.