if (requireNamespace("ggplot2", quietly = TRUE) & requireNamespace("gghighlight", quietly = TRUE)) {
# Generate a plot
p <- plot_ftir(sample_spectra)
# Highlight one sample:
highlight_sample(p, "isopropanol")
}
Run the code above in your browser using DataLab