Interactive spectrum with click-locked reference peak
plotly_Spectra_Ring_Artifact.RdExtends plotly_Spectra() with a plotly.js click handler (no Shiny).
Click a peak to lock it as the reference; hover labels then show
\(\Delta\)m/z and relative intensity versus that peak. Click the same
peak again to clear the selection. Useful for inspecting ring artifacts
and related constant-spacing patterns.
Usage
plotly_Spectra_Ring_Artifact(
sp,
label.top = 10,
show.info = FALSE,
transform = c("identity", "log10")
)Arguments
- sp
A
Spectraobject. If multiple spectra are provided, only the first is used.- label.top
Integer. Number of highest intensity peaks to highlight. Default is
10.- show.info
Logical. If
TRUE, displays precursor information (m/z, intensity, collision energy) in the plot title. Default isFALSE.- transform
Character. Y-axis transform:
"identity"(default) or"log10".