plot_spectraNMR {MWASTools}R Documentation

Plot NMR spectra

Description

This function generates an NMR spectra plot, with the chemical shifts displayed along the x-axis, and the peak intensities displayed on the y-axis.

Usage

plot_spectraNMR (metabo_SE, type = "l", lty = 1, xlab ="ppm",
                 ylab ="intensity", xlim = NULL, ...)

Arguments

metabo_SE

SummarizedExperiment object. See "MWAS_SummarizedExperiment()".

type

character vector indicating the type of plot for each row of metabo_matrix. For all possible types, see "plot()".

lty

character vector of line types. For all possible types, see "plot()".

xlab

character vector specifying a title for the x-axis.

ylab

character vector specifying a title for the y-axis.

xlim

numeric vector containing the minimum and maximum values of the x axis. Notice that ppm is displayed in reverse scale (e.g. xlim = c(10, 0)).

...

other arguments passed to "matplot()".

Value

An NMR spectra plot.

Examples

## Load data
data(metabo_SE)

## Plot first 2 spectra
plot_spectraNMR (metabo_SE[, 1:2])
plot_spectraNMR (metabo_SE[, 1:2], xlim = c(1.03, 0.85), main = "NMR spectra")

[Package MWASTools version 1.8.0 Index]