plot_ms: Plots the mass spectra of a peak.

View source: R/find_ms.R

plot_msR Documentation

Plots the mass spectra of a peak.

Description

plot_ms Plots the mass spectra of a peak.

Usage

plot_ms(ms, title = "Mass Spectrum")

Arguments

ms

a data.frame object. A data frame of the mass values and the percent intensity values, ideally the output of find_ms().

title

a string object. Title placed at the top of the plot. Default title "Mass Spectrum".

Details

This function produces a line plot of the mass spectra data. The mass values vs the percent intensity values as a percent of the highest intensity using ggplot from ggplot2 package \insertCiteggplot2gcxgclab.

Value

A ggplot object. A line plot of the mass spectra data. The mass values vs the percent intensity values as a percent of the highest intensity.

References

\insertAllCited

Examples

file <- system.file("extdata","sample1.cdf",package="gcxgclab")
frame <- extract_data(file,mod_t=.5)
peaks <- top_peaks(frame$TIC_df, 5)
mz <- find_ms(frame, t_peak=peaks$'T'[1])
plot_ms(mz)


gcxgclab documentation built on May 29, 2024, 5:33 a.m.