get_plot_sample_ids: Get Plot Sample IDs

View source: R/utils.R

get_plot_sample_idsR Documentation

Get Plot Sample IDs

Description

Get the sample IDs from a prepared plot. Useful if renaming in the plot legend.

Obtenez les ID d’échantillon à partir d’un tracé préparé. Utile si vous renommez dans la légende de le tracé

Usage

get_plot_sample_ids(ftir_spectra_plot)

Arguments

ftir_spectra_plot

A plot generated by [plot_ftir()] or [plot_ftir_stacked()].

Un tracé généré par [plot_ftir()] ou [plot_ftir_stacked()].

Value

A vector of factors corresponding to the sample IDs in the plot.

unvecteur de facteurs correspondant aux ID d'échantillon dans le tracé

See Also

[rename_plot_sample_ids()]

Examples

if (requireNamespace("ggplot2", quietly = TRUE)) {
  # Prepare a plot
  p <- plot_ftir(biodiesel)

  # Get the Sample IDs
  get_plot_sample_ids <- (p)
}

PlotFTIR documentation built on April 13, 2025, 5:11 p.m.