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)

Arguments

object

A instance of class Spectra of length 1.

Value

A plotly object.

Author

Laurent Gatto, Johannes Rainer

Examples

library(msdata)
fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML", package = "msdata")
pest_ms2 <- filterMsLevel(Spectra(fl), 2L)

plotlySpectra(pest_ms2[950])