uplot_freq_vs_ppm: Mass Accuracy Frequency Histogram

View source: R/uplot_freq_vs_ppm.R

uplot_freq_vs_ppmR Documentation

Mass Accuracy Frequency Histogram

Description

Creates a histogram showing the frequency distribution of mass accuracy values (ppm). Displays median and quantile statistics in the title and optionally adds a UME caption (logo). The plot uses the unified UME theme (theme_uplots()), ensuring visual consistency across all ⁠uplot_*⁠ functions.

Usage

uplot_freq_vs_ppm(
  df,
  col = "grey",
  width = 0.01,
  gg_size = 12,
  logo = TRUE,
  plotly = FALSE
)

Arguments

df

A data.table or data.frame containing columns:

  • ppm — mass accuracy in ppm

  • ⁠14N⁠, ⁠32S⁠, ⁠31P⁠, dbe_o — required for consistency with UME QC tools

col

Character. Histogram bar color. Default "grey".

width

Numeric. Histogram bin width (not used when bins = 100).

gg_size

Base text size for theme_uplots(). Default = 12.

Logical. If TRUE, adds a UME caption.

plotly

Logical. If TRUE, return interactive plotly object.

Details

This plot is useful for visual inspection of mass accuracy performance. The required additional columns (⁠14N⁠, ⁠32S⁠, ⁠31P⁠, dbe_o) ensure that the dataset is a complete UME molecular formula table and can be compared to other quality-control plots.

Value

A ggplot2 histogram, or a plotly object if plotly = TRUE.

See Also

Other plots: uplot_cluster(), uplot_cvm(), uplot_dbe_minus_o_freq(), uplot_dbe_vs_c(), uplot_freq_ma(), uplot_hc_vs_m(), uplot_heteroatoms(), uplot_isotope_precision(), uplot_kmd(), uplot_lcms(), uplot_ma_vs_mz(), uplot_ms(), uplot_n_mf_per_sample(), uplot_pca(), uplot_ratios(), uplot_reproducibility(), uplot_ri_vs_sample(), uplot_vk()

Examples

uplot_freq_vs_ppm(mf_data_demo)


ume documentation built on Dec. 13, 2025, 1:06 a.m.