Plot range of y axis values (usually intensities) of spectroscopic data between selected percentilles.
Function qplot_spRange() returns whole ggplot and function layer_spRange() returns a layer which can be added to a ggplot.

check_palette(palette, Groups)

qplot_spRange(
  sp,
  by = NULL,
  percent = NULL,
  probs = NULL,
  palette = hyGet_palette(sp),
  ...,
  alpha = 0.2,
  add = FALSE,
  name_if_by_is_NULL = "All Data"
)

layer_spRange(sp, by = NULL, percent = NULL, probs = NULL, ..., alpha = 0.2)

gg_spRange(sp, by = NULL, percent = NULL, probs = NULL, ..., alpha = 0.2)

Arguments

sp

hyperSpec object.

by

A vector (factor variable) with indicated groups for each case: either variable name inside the object sp, or a vector of length nrow(sp).

percent

Numeric value between 0 and 100 that indicates percentage of samples nearest to median be plotted as a ribbon.

probs

verctor of size 2 with values between 0 and 1 that indicates probabilities at which percentiles should be plotted.

...

further arguments to geom_ribon.

alpha

(numeric from 0 to 1) transperency.

add

(logical) add plot to an existing ggplot object?

Value

A ggplot object. More details in package ggplot2.

Author

Vilmantas Gegzna

Examples