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.
Usage
scan_chrom(
chrom_list,
idx,
lambda,
plot_spectrum = TRUE,
peak_table = NULL,
scale_spectrum = FALSE,
spectrum_labels = TRUE,
export_spectrum = FALSE,
...
)Arguments
- chrom_list
A list of chromatograms in matrix format (timepoints × wavelengths). If no argument is provided here, the function will try to find the
chrom_listobject using the pointer in thepeak_table.- idx
Index or name of the chromatogram to plot. If missing, you are prompted for one.
- lambda
The wavelength at which to plot the chromatographic trace. Required;
"max"is not accepted.- plot_spectrum
Logical. If
TRUE, plots the spectrum of the chosen peak. Defaults toTRUE.- peak_table
A
peak_tableobject created byget_peaktable.- scale_spectrum
Logical. If
TRUE, scales spectrum to unit height. Defaults toFALSE.- spectrum_labels
Logical. If
TRUE, plots labels on maxima in spectral plot. Defaults toTRUE.- export_spectrum
Logical. If
TRUE, invisibly returns the spectrum as adata.frame. Defaults toFALSE.- ...
Additional arguments to
plot_spectrum.
Value
Invisibly returns the spectrum when export_spectrum = TRUE and
plot_spectrum = TRUE; otherwise the numeric index of the scan selected by
the user.
Details
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.
See also
Other visualization functions:
boxplot.peak_table(),
mirror_plot(),
plot.chrom_list(),
plot.matched_peak_list(),
plot.peak_list(),
plot.peak_table(),
plot_all_spectra(),
plot_chrom_contour(),
plot_chroms(),
plot_chroms_heatmap(),
plot_spectrum()
Examples
if (FALSE) { # interactive()
data(Sa_pr)
scan_chrom(Sa_pr, lambda = "210", idx = 2, export_spectrum = TRUE)
}
