| uplot_ms | R Documentation |
Plots the mass spectrum, showing magnitude versus mass-to-charge ratio (m/z).
Optionally reduces the data by selecting the top data_reduction most abundant peaks per spectrum.
uplot_ms(
pl,
mass = "mz",
peak_magnitude = "i_magnitude",
label = "file_id",
logo = FALSE,
plotly = TRUE,
data_reduction = 1,
...
)
pl |
A data table that must contain columns for mass-to-charge ratio and peak magnitude (could be peak list or molecular formula data). |
mass |
Character. Name of the column containing mass-to-charge or mass information (default = "mz"). |
peak_magnitude |
Character. Name of the column containing (relative) peak magnitude information (default = "i_magnitude"). |
label |
Character. Name of the column containing the names of the mass spectra to be displayed (default = "file_id"). |
logo |
Logical. If TRUE, adds a UME caption. |
plotly |
Logical. If TRUE, return interactive plotly object. |
data_reduction |
Numeric. The percentage of the most abundant peaks to select per spectrum. This value should be between 0 and 1 (default = 1, which means all data will be displayed). If set to 0, no data reduction will occur, but a minimum value of 0.01 will be used to ensure some data is displayed. |
... |
Additional arguments passed to methods. |
A ggplot (class "ggplot") or plotly (class "htmlwidget") object representing the mass spectrum.
Other plots:
uplot_cluster(),
uplot_cvm(),
uplot_dbe_minus_o_freq(),
uplot_dbe_vs_c(),
uplot_freq_ma(),
uplot_freq_vs_ppm(),
uplot_hc_vs_m(),
uplot_heteroatoms(),
uplot_isotope_precision(),
uplot_kmd(),
uplot_lcms(),
uplot_ma_vs_mz(),
uplot_n_mf_per_sample(),
uplot_pca(),
uplot_ratios(),
uplot_reproducibility(),
uplot_ri_vs_sample(),
uplot_vk()
uplot_ms(pl = peaklist_demo, data_reduction = 0.1, plotly = TRUE)
uplot_ms(pl = peaklist_demo, data_reduction = 1, plotly = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.