The plotlySpectra()
function displays a single spectrum stored
in a Spectra
object using the plotly::plot_ly()
function.
See ?SpectraVis
for an example.
plotlySpectra(object)
A instance of class Spectra
of length 1.
A plotly
object.
library(msdata)
fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML", package = "msdata")
pest_ms2 <- filterMsLevel(Spectra(fl), 2L)
plotlySpectra(pest_ms2[950])