normaliseSpectra: Normalisation

Description Usage Arguments Value Examples

View source: R/load_data.R

Description

Normalise a data frame of spectra to a constant sum (CS) or with a method of PepsNMR package (see Normalization).

Usage

1
normaliseSpectra(spectra, type.norm = "CS", verbose = TRUE, ...)

Arguments

spectra

Data frame with spectra in columns and chemical shifts in rows. Colnames of this data frame correspond to pure metabolite names and rownames to chemical shift grid (in ppm).

type.norm

Type of normalisation : "CS", "mean", "pqn", "median", "firstquartile" or "peak". Default to "CS".

verbose

A boolean value to allow print out process information.

...

other arguments to be passed to Normalization

Value

A data frame with normalised spectra in columns and chemical shifts (in ppm) in rows.

Examples

1
2
3
4
current_path <- system.file("extdata", package = "ASICS")
spectra_data <- importSpectra(name.dir = current_path,
                     name.file = "spectra_example.txt", type.import = "txt")
spectra_norm <- normaliseSpectra(spectra_data, type.norm = "pqn")

GaelleLefort/ASICS documentation built on July 19, 2020, 2:08 p.m.