plot_spectraNMR: Plot NMR spectra

Description Usage Arguments Value Examples

View source: R/plot_NMR_spectra.R

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

1
2
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

1
2
3
4
5
6
## 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")

Example output



MWASTools documentation built on Nov. 8, 2020, 5:07 p.m.