View source: R/plot_spectrum.R
scan_chrom | R Documentation |
Plot spectra by clicking on the chromatogram
scan_chrom(
chrom_list,
idx,
lambda,
plot_spectrum = TRUE,
peak_table = NULL,
scale_spectrum = FALSE,
spectrum_labels = TRUE,
export_spectrum = FALSE,
chr = NULL,
...
)
chrom_list |
A list of chromatograms in matrix format (timepoints x
wavelengths). If no argument is provided here, the function will try to find
the |
idx |
Numerical index of chromatogram you wish to plot. |
lambda |
The wavelength to plot the trace at. |
plot_spectrum |
Logical. Whether to plot the spectrum or not. |
peak_table |
The peak table (output from |
scale_spectrum |
Logical. If TRUE, scales spectrum to unit height. Defaults to FALSE. |
spectrum_labels |
Logical. If TRUE, plots labels on maxima in spectral plot. Defaults to TRUE. |
export_spectrum |
Logical. If TRUE, exports spectrum to console. Defaults to FALSE. |
chr |
Deprecated. Please use |
... |
Additional arguments. |
If export_spectrum
is TRUE, returns the spectrum as a
data.frame
with wavelengths as rows and a single column encoding the
absorbance (or normalized absorbance, if scale_spectrum
is TRUE)
at each wavelength. Otherwise, there is no return value.
Plots a chromatographic trace from the specified chromatogram (idx
),
at the specified wavelength (lambda
) with a dotted red line to indicate
the user-selected retention time. The trace is a single column from the
chromatographic matrix.
If plot_spectrum
is TRUE, plots the spectrum for the specified
chromatogram at the user-specified retention time. 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_all_spectra()
,
plot_chroms()
,
plot_spectrum()
data(Sa_pr)
scan_chrom(Sa_pr, lambda = "210", idx = 2, export_spectrum = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.