visualisation-methods-spectra {ASICS} | R Documentation |
Methods available to plot one object in ASICS package.
## S4 method for signature 'Spectra,ANY' plot(x, y, xlim = c(0.5, 10), ylim = NULL, ...) ## S4 method for signature 'ASICSResults,ANY' plot(x, y, idx = 1, xlim = c(0.5, 10), ylim = NULL, pure.library = NULL, add.metab = NULL, ...)
x |
An object of class Spectra, PureLibrary or ASICSResults. |
y |
Currently not used. |
xlim, ylim |
Boundaries for x and y, respectively. |
... |
Currently not used. |
idx |
Index of the spectrum to plot. Default to 1. |
pure.library |
Pure library used for the quantification. Default to
|
add.metab |
Name of one metabolite to add to the plot. Default to
|
A ggplot
plot of all spectra (or of a subset) on
the same figure for Spectra and PureLibrary
objects.
A ggplot
plot of original and reconstructed
spectra of one sample in the same figure for ASICSResults
object. In addition, one pure metabolite spectrum (as provided in the
reference library) and the deformed one can be superimposed to the plot.
# Import data and create object current_path <- system.file("extdata", "example_spectra", package = "ASICS") spectra_data <- importSpectraBruker(current_path) spectra_obj <- createSpectra(spectra_data) spectra_obj <- createSpectra(spectra_data) # Plot the spectra plot(spectra_obj)