reviewAllSpectra {ChemoSpec}R Documentation

Review All the Spectra in a Spectra Object

Description

Utility to review all spectra in a Spectra object. Output depends upon the graphics output choice.

base:

Plots each spectrum one at a time, and waits for a return in the console before plotting the next spectrum. Use ESC to get out of the loop.

ggplot2:

All the spectra are plotted in a single column.

Usage

reviewAllSpectra(spectra, ...)

Arguments

spectra

An object of S3 class Spectra.

...

Parameters to be passed to the plotting routines. Applies to base graphics only.

Value

The returned value depends on the graphics option selected (see GraphicsOptions).

base:

None. Side effect is a plot.

ggplot2:

The plot is displayed, and a ggplot2 plot object is returned if the value is assigned. The plot can be modified in the usual ggplot2 manner.

Author(s)

Bryan A. Hanson (DePauw University), Tejasvi Gupta.

See Also

See GraphicsOptions for more information about the graphics options. Additional documentation at https://bryanhanson.github.io/ChemoSpec/

Examples

# Because there are 16 spectra in this data set, you probably want to
# expand the height of the graphics device to see the spectra clearly.
# This example assumes the graphics output is set to ggplot2 or plotly (see ?GraphicsOptions).
# If you do options(ChemoSpecGraphics == "plotly") you'll get the results
# in a web page, which is particularly convenient.
library("ggplot2")
data(metMUD1)
p <- reviewAllSpectra(metMUD1)
p



[Package ChemoSpec version 6.0.1 Index]