Creates a frequency plot (bar plot) for a selected variable in a molecular formula dataset. Values are grouped and counted, then visualized as bars. A unified UME plot theme is applied for consistent styling across all uplot_* functions.
uplot_freq(
mfd,
var = "14N",
col = "grey",
space = 0.5,
width = 0.3,
logo = TRUE,
gg_size = 12,
plotly = FALSE,
...
)A ggplot object, or a plotly object when plotly = TRUE.
data.table with molecular formula data as derived from
ume::assign_formulas. Column names of elements/isotopes must match names in
the isotope column of ume::masses; values are integers representing
counts per formula.
Character. Name of the variable for which the frequency
distribution should be plotted (e.g. "14N").
Bar fill color.
Not used (kept for backward compatibility).
Bar width.
Logical. If TRUE, adds a UME caption.
Base text size for theme_uplots(). Default = 12.
Logical. If TRUE, return interactive plotly object.
Additional arguments passed to methods.