hs_contrast: Contrast plot for Raman spectra

Description Usage Arguments Value Examples

View source: R/hs_contrast.R

Description

A way to visualize contrasts between Raman spectra from different samples in an existing hyperSpec object

Usage

1
hs_contrast(hs.x, comp1, comp2, plot = TRUE)

Arguments

hs.x

a hyperSpec object

comp1

numeric (any length) or boolean (TRUE/FALSE - length equal to number of spectra in hs.x) vector with sample names from one side of the comparisons

comp2

numeric (any length) or boolean (TRUE/FALSE - length equal to number of spectra in hs.x) vector with sample names from the other side of the comparisons

plot

a logical indicating whether or not the constrasts should be plotted (defaults to TRUE)

Value

a dataframe containing the contrast values between the averaged spectra

Examples

1
2
3
4
5
6
7
8
## Short example
data("hs_example")

# Preprocess
hs_example <- hs_preprocess(hs_example)

# Run contrast comparison
hs.cont <- hs_contrast(hs_example, comp1 = c(1:4), comp2 = c(8:20))

CMET-UGent/MicroRaman documentation built on July 25, 2020, 6:20 p.m.