Learn R Programming

ume (version 1.5.2)

uplot_vk: uplot_vk

Description

Creates a Van Krevelen diagram (H/C vs O/C).

Usage

uplot_vk(
  mfd,
  z_var = "norm_int",
  nice_labels = TRUE,
  projection = TRUE,
  palname = "viridis",
  median_vK = TRUE,
  col_median = "white",
  ai = TRUE,
  logo = TRUE,
  size_dots = 3,
  col_bar = TRUE,
  tf = FALSE,
  cex.axis = 12,
  cex.lab = 15,
  plotly = FALSE,
  ...
)

Value

ggplot or plotly object

Arguments

mfd

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.

z_var

Character. Column name for variable used for color-coding. Content of column should be numeric.

nice_labels

Logical. If true (default) axis/legend labels are generated from ume::nice_labels_dt.

projection

If TRUE, median z-values per (oc,hc) are used.

palname

Color palette name for f_colorz() (viridis, magma, plasma, etc.).

median_vK

Add median VK point.

col_median

Color of the marker for the median O/C and H/C value (Default = "white")

ai

Add aromaticity index threshold lines.

logo

Logical. If TRUE, adds a UME caption.

size_dots

Numeric. Size of the dots in the plot (default = 0.5).

col_bar

Logical. If TRUE, adds a color legend (default is TRUE).

tf

Logical. If TRUE, applies a transformation to the color scale (default is FALSE).

cex.axis

Numeric. Size of axis text (default is 1).

cex.lab

Numeric. Size of axis labels (default is 1.4).

plotly

Logical. If TRUE, return interactive plotly object.

...

Arguments passed on to f_colorz

z

Numeric vector. Values whose colors should be computed.

col_num

Integer. Number of colors in the palette (default: 100).

verbose

logical; if TRUE, show progress messages.

Details

Plot Van Krevelen Diagram

References

Van Krevelen D. (1950). Graphical-statistical method for the study of structure and reaction processes of coal. Fuel, 29, 269-284.

Kim S., Kramer R.W., Hatcher P.G. (2003). Graphical method for analysis of ultrahigh-resolution broadband mass spectra of natural organic matter, the Van Krevelen Diagram. Analytical Chemistry, 75, 5336-5344. tools:::Rd_expr_doi("10.1021/ac034415p")

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