Learn R Programming

ume (version 1.5.2)

uplot_freq_vs_ppm: 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
)

Value

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

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.

logo

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.

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

Run this code
uplot_freq_vs_ppm(mf_data_demo)

Run the code above in your browser using DataLab