View source: R/plot_spectrum.R
plot_all_spectra | R Documentation |
Plot multiple for a given peak in peak table. Wrapper for
plot_spectrum
.
plot_all_spectra(
peak,
peak_table,
chrom_list,
idx = "all",
chrs = NULL,
engine = c("base", "ggplot2", "plotly"),
plot_spectrum = TRUE,
export_spectrum = TRUE,
scale_spectrum = TRUE,
overlapping = TRUE,
verbose = FALSE,
what = c("peak", "rt", "idx"),
...
)
peak |
The name of a peak to plot (in character format) |
peak_table |
The peak table (output from |
chrom_list |
A list of chromatograms in matrix format (timepoints x
components). If no argument is provided here, the function will
try to find the |
idx |
Vector of chromatograms to plot. |
chrs |
Deprecated. Please use |
engine |
Which plotting engine to use: |
plot_spectrum |
Logical. If TRUE, plots the spectrum of the chosen peak. |
export_spectrum |
Logical. If TRUE, exports spectrum to console. Defaults to FALSE. |
scale_spectrum |
Logical. If TRUE, scales spectrum to unit height. |
overlapping |
Logical. If TRUE, plot spectra in single plot. |
verbose |
Logical. If TRUE, prints verbose output to console. |
what |
What to look for. Either |
... |
Additional arguments to plot_spectrum. |
If export_spectrum
is TRUE, returns the spectra as a
data.frame
with wavelengths as rows and one column for each sample in the
chrom_list
encoding the absorbance (or normalized absorbance, if
scale_spectrum
is TRUE) at each wavelength. Otherwise, there is no
return value.
If plot_spectrum
is TRUE, plots the spectra for the specified chromatogram
(idx
) of the given peak
. The spectrum is a single row
from the chromatographic matrix.
Ethan Bass
Other visualization functions:
boxplot.peak_table()
,
mirror_plot()
,
plot.peak_list()
,
plot.peak_table()
,
plot_chroms()
,
plot_spectrum()
,
scan_chrom()
data(Sa_warp)
pks <- get_peaks(Sa_warp, lambda="220")
pk_tab <- get_peaktable(pks)
plot_all_spectra(peak="V13", peak_table = pk_tab, overlapping = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.