Learn R Programming

ume (version 1.5.2)

uplot_heteroatoms: Heteroatom Combination vs Mass Accuracy

Description

Produces a boxplot visualizing the distribution of mass accuracy (ppm) for different heteroatom combinations (nsp_type) defined by the number of nitrogen (N), sulfur (S), and phosphorus (P) atoms in each formula.

The plot can be returned as either a ggplot object or as an interactive plotly object (plotly = TRUE). An optional “UltraMassExplorer” watermark can be added.

Usage

uplot_heteroatoms(df, col = "grey", gg_size = 12, logo = TRUE, plotly = FALSE)

Value

A ggplot or plotly interactive boxplot.

Arguments

df

A data.table containing at least:

  • nsp_type: character or factor indicating heteroatom combinations

  • ppm: numeric mass accuracy values

col

Character. Box color. Default "grey".

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.

See Also

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_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_heteroatoms(mf_data_demo)

Run the code above in your browser using DataLab